WarpX: Add hints for FindMPI (#31842)

This seems to be needed on some cray systems and is safe on normal
desktops.
This commit is contained in:
kwryankrattiger 2022-08-20 08:45:03 -05:00 committed by GitHub
parent 51619fdb00
commit fff929d5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,13 +189,18 @@ def cmake_args(self):
self.define_from_variant("WarpX_QED_TABLE_GEN", "qedtablegen"),
]
with when("+openpmd"):
# FindMPI needs an extra hint sometimes, particularly on cray systems
if "+mpi" in spec:
args.append(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
args.append(self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx))
if "+openpmd" in spec:
args.append("-DWarpX_openpmd_internal=OFF")
# Work-around for SENSEI 4.0: wrong install location for CMake config
# https://github.com/SENSEI-insitu/SENSEI/issues/79
if "+sensei" in spec:
args.append(self.define("SENSEI_DIR", join_path(spec["sensei"].prefix.lib, "cmake")))
args.append(self.define("SENSEI_DIR", spec["sensei"].prefix.lib.cmake))
return args