diff options
author | Toyohisa Kameyama <kameyama@riken.jp> | 2020-06-07 06:30:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 16:30:43 -0500 |
commit | 7bc44fa1651df7570060b8d3f4bd60592248a562 (patch) | |
tree | 5080d21d99aca42a165be38be647f0142579039b | |
parent | 8f291c7e9545212d3d8688926b82fc8ec8a1ad13 (diff) | |
download | spack-7bc44fa1651df7570060b8d3f4bd60592248a562.tar.gz spack-7bc44fa1651df7570060b8d3f4bd60592248a562.tar.bz2 spack-7bc44fa1651df7570060b8d3f4bd60592248a562.tar.xz spack-7bc44fa1651df7570060b8d3f4bd60592248a562.zip |
ffr: fix mpi programs to use mpi compiler wrapper. (#16948)
-rw-r--r-- | var/spack/repos/builtin/packages/ffr/package.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/ffr/package.py b/var/spack/repos/builtin/packages/ffr/package.py index bd3c8258d1..35ac20f9f6 100644 --- a/var/spack/repos/builtin/packages/ffr/package.py +++ b/var/spack/repos/builtin/packages/ffr/package.py @@ -42,7 +42,8 @@ class Ffr(MakefilePackage): elif spec.satisfies('%fj'): fflags.append('-Fwide') d = find('.', 'src_main', recursive=True) - root_dir = os.path.dirname(d[0]) + src_main = d[0] + root_dir = os.path.dirname(src_main) make = join_path(root_dir, 'src_pre', 'src', 'Makefile') os.chmod(make, 0o644) filter_file('#CSRCS =.*$', 'CSRCS = kmetis_main.c io.c', make) @@ -51,9 +52,17 @@ class Ffr(MakefilePackage): 'LIBPRE = ' + spec['metis'].libs.ld_flags, make ) + + make = join_path(src_main, 'src', 'Makefile') + os.chmod(make, 0o644) + with open(make, 'a') as m: + m.write('module_hpc.o: module_hpc.f\n') + m.write('\t$(MPI_F90) $(FFLAGS) -c $<\n') + m.write('\n') + m.write('hpc.o: hpc.f\n') + m.write('\t$(MPI_F90) $(FFLAGS) -c $<\n') + if spec.satisfies('@3.0_000'): - d = find('.', 'src_main', recursive=True) - root_dir = os.path.dirname(d[0]) for d in ['src_pre', 'FFR2VIZ']: workdir = join_path(root_dir, d, 'src') make = join_path(workdir, 'Makefile') |