fujitsu-mpi: add gcc and clang support (#43053)
Co-authored-by: domke <673751-domke@users.noreply.gitlab.com>
This commit is contained in:
		| @@ -14,7 +14,13 @@ class FujitsuMpi(Package): | ||||
|     homepage = "https://www.fujitsu.com/us/" | ||||
| 
 | ||||
|     provides("mpi@3.1:") | ||||
|     requires("%fj") | ||||
|     requires( | ||||
|         "%fj@4:", | ||||
|         "%clang@11:", | ||||
|         "%gcc@8:", | ||||
|         policy="one_of", | ||||
|         msg="currently only supports Fujitsu, Clang, or GCC compilers", | ||||
|     ) | ||||
| 
 | ||||
|     def install(self, spec, prefix): | ||||
|         raise InstallError("Fujitsu MPI is not installable; it is vendor supplied") | ||||
| @@ -36,15 +42,27 @@ def libs(self): | ||||
|         return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) | ||||
| 
 | ||||
|     def setup_dependent_package(self, module, dependent_spec): | ||||
|         self.spec.mpicc = self.prefix.bin.mpifcc | ||||
|         self.spec.mpicxx = self.prefix.bin.mpiFCC | ||||
|         self.spec.mpif77 = self.prefix.bin.mpifrt | ||||
|         self.spec.mpifc = self.prefix.bin.mpifrt | ||||
|         if self.spec.satisfies("%gcc"): | ||||
|             self.spec.mpicc = self.prefix.bin.mpicc | ||||
|             self.spec.mpicxx = self.prefix.bin.mpicxx | ||||
|             self.spec.mpif77 = self.prefix.bin.mpif77 | ||||
|             self.spec.mpifc = self.prefix.bin.mpifort | ||||
|         else: | ||||
|             self.spec.mpicc = self.prefix.bin.mpifcc | ||||
|             self.spec.mpicxx = self.prefix.bin.mpiFCC | ||||
|             self.spec.mpif77 = self.prefix.bin.mpifrt | ||||
|             self.spec.mpifc = self.prefix.bin.mpifrt | ||||
| 
 | ||||
|     def setup_run_environment(self, env): | ||||
|         # Because MPI are both compilers and runtimes, we set up the compilers | ||||
|         # as part of run environment | ||||
|         env.set("MPICC", self.prefix.bin.mpifcc) | ||||
|         env.set("MPICXX", self.prefix.bin.mpiFCC) | ||||
|         env.set("MPIF77", self.prefix.bin.mpifrt) | ||||
|         env.set("MPIF90", self.prefix.bin.mpifrt) | ||||
|         if self.spec.satisfies("%gcc"): | ||||
|             env.set("MPICC", self.prefix.bin.mpicc) | ||||
|             env.set("MPICXX", self.prefix.bin.mpicxx) | ||||
|             env.set("MPIF77", self.prefix.bin.mpif77) | ||||
|             env.set("MPIF90", self.prefix.bin.mpifort) | ||||
|         else: | ||||
|             env.set("MPICC", self.prefix.bin.mpifcc) | ||||
|             env.set("MPICXX", self.prefix.bin.mpiFCC) | ||||
|             env.set("MPIF77", self.prefix.bin.mpifrt) | ||||
|             env.set("MPIF90", self.prefix.bin.mpifrt) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jdomke
					jdomke