summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2020-01-28 15:13:51 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2020-01-28 15:13:51 -0600
commite7106563109276f0dbb472ae88fc14575a001db2 (patch)
tree29907a55a6e9b5cbf50fbb449801fcbfad993d3e
parent2b0b340aabc77dd24c2c3158dec979a6352130f4 (diff)
downloadspack-e7106563109276f0dbb472ae88fc14575a001db2.tar.gz
spack-e7106563109276f0dbb472ae88fc14575a001db2.tar.bz2
spack-e7106563109276f0dbb472ae88fc14575a001db2.tar.xz
spack-e7106563109276f0dbb472ae88fc14575a001db2.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/no_parallel_build.patch12
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/package.py4
2 files changed, 16 insertions, 0 deletions
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)