diff options
author | Toyohisa Kameyama <kameyama@riken.jp> | 2020-06-10 21:53:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 14:53:09 +0200 |
commit | f6020d259aacfe1f7168d61f96f3f7fbb8fbe7d5 (patch) | |
tree | 644053c672d506c1a1c5fd2264fecb41ad081da6 /var | |
parent | 0de12be52a0a3672cc2e3268e3048c65865ba950 (diff) | |
download | spack-f6020d259aacfe1f7168d61f96f3f7fbb8fbe7d5.tar.gz spack-f6020d259aacfe1f7168d61f96f3f7fbb8fbe7d5.tar.bz2 spack-f6020d259aacfe1f7168d61f96f3f7fbb8fbe7d5.tar.xz spack-f6020d259aacfe1f7168d61f96f3f7fbb8fbe7d5.zip |
adios2: fix to build on Fujitsu MPI and Fujitsu compiler (#17034)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/adios2/package.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 59e442a27d..8e2d0d00e3 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -119,10 +119,20 @@ class Adios2(CMakePackage): # See https://github.com/ornladios/ADIOS2/pull/1899 patch('2.5-fix-clear_cache.patch', when='@2.5.0') + @when('%fj') + def patch(self): + """ add fujitsu mpi commands #16864 """ + f = join_path('cmake', 'upstream', 'FindMPI.cmake') + filter_file('mpcc_r)', 'mpcc_r mpifcc)', f, string=True) + filter_file('mpc++_r)', 'mpcc_r mpiFCC)', f, string=True) + filter_file('mpf77_r', 'mpf77_r mpifrt', f, string=True) + def setup_build_environment(self, env): # https://github.com/ornladios/ADIOS2/issues/2228 if self.spec.satisfies('%gcc@10: +fortran'): env.set('FFLAGS', '-fallow-argument-mismatch') + elif self.spec.satisfies('%fj +fortran'): + env.set('FFLAGS', '-Ccpp') def cmake_args(self): spec = self.spec @@ -185,6 +195,12 @@ class Adios2(CMakePackage): args.append('-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL={0}'.format( 'ON' if '+pic' in spec else 'OFF')) + if spec.satisfies('%fj'): + args.extend([ + '-DCMAKE_Fortran_SUBMODULE_EXT=.smod', + '-DCMAKE_Fortran_SUBMODULE_SEP=.' + ]) + if spec.satisfies('+python') or self.run_tests: args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s' % spec['python'].command.path) |