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/" |     homepage = "https://www.fujitsu.com/us/" | ||||||
| 
 | 
 | ||||||
|     provides("mpi@3.1:") |     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): |     def install(self, spec, prefix): | ||||||
|         raise InstallError("Fujitsu MPI is not installable; it is vendor supplied") |         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) |         return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) | ||||||
| 
 | 
 | ||||||
|     def setup_dependent_package(self, module, dependent_spec): |     def setup_dependent_package(self, module, dependent_spec): | ||||||
|         self.spec.mpicc = self.prefix.bin.mpifcc |         if self.spec.satisfies("%gcc"): | ||||||
|         self.spec.mpicxx = self.prefix.bin.mpiFCC |             self.spec.mpicc = self.prefix.bin.mpicc | ||||||
|         self.spec.mpif77 = self.prefix.bin.mpifrt |             self.spec.mpicxx = self.prefix.bin.mpicxx | ||||||
|         self.spec.mpifc = self.prefix.bin.mpifrt |             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): |     def setup_run_environment(self, env): | ||||||
|         # Because MPI are both compilers and runtimes, we set up the compilers |         # Because MPI are both compilers and runtimes, we set up the compilers | ||||||
|         # as part of run environment |         # as part of run environment | ||||||
|         env.set("MPICC", self.prefix.bin.mpifcc) |         if self.spec.satisfies("%gcc"): | ||||||
|         env.set("MPICXX", self.prefix.bin.mpiFCC) |             env.set("MPICC", self.prefix.bin.mpicc) | ||||||
|         env.set("MPIF77", self.prefix.bin.mpifrt) |             env.set("MPICXX", self.prefix.bin.mpicxx) | ||||||
|         env.set("MPIF90", self.prefix.bin.mpifrt) |             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