From e7106563109276f0dbb472ae88fc14575a001db2 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 28 Jan 2020 15:13:51 -0600 Subject: Set netcdf-fortran to build serially with Intel compiler (#14461) * Set netcdf-fortran to build serially with Intel compiler This PR turns off parallel builds when the Intel compiler is used. Builds with the Intel compiler will fail otherwise. * Change how parallel build is handled Use patch from netcdf-fortran project to turn off parallel buildi for version 4.5.2. --- .../builtin/packages/netcdf-fortran/no_parallel_build.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/netcdf-fortran/package.py | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/netcdf-fortran/no_parallel_build.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/no_parallel_build.patch b/var/spack/repos/builtin/packages/netcdf-fortran/no_parallel_build.patch new file mode 100644 index 0000000000..c232a62bc5 --- /dev/null +++ b/var/spack/repos/builtin/packages/netcdf-fortran/no_parallel_build.patch @@ -0,0 +1,12 @@ +--- a/fortran/Makefile.in 2019-09-18 12:29:45.000000000 -0500 ++++ b/fortran/Makefile.in 2020-01-24 10:56:03.660035265 -0600 +@@ -1095,6 +1095,9 @@ + @USE_LOGGING_TRUE@ echo ' integer nf_set_log_level' >> netcdf.inc + @USE_LOGGING_TRUE@ echo ' external nf_set_log_level' >> netcdf.inc + ++# Turn off parallel builds in this directory. ++.NOTPARALLEL: ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index 891ad5b81a..e3703fd609 100644 --- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py +++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py @@ -36,6 +36,10 @@ class NetcdfFortran(AutotoolsPackage): # https://github.com/Unidata/netcdf-fortran/issues/94 patch('nag.patch', when='@:4.4.4%nag') + # Parallel builds do not work in the fortran directory. This patch is + # derived from https://github.com/Unidata/netcdf-fortran/pull/211 + patch('no_parallel_build.patch', when='@4.5.2') + def flag_handler(self, name, flags): if name in ['cflags', 'fflags'] and '+pic' in self.spec: flags.append(self.compiler.pic_flag) -- cgit v1.2.3-70-g09d2