diff options
author | Kevin Manalo <kmanalo@users.noreply.github.com> | 2019-08-23 20:16:09 -0400 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-08-23 17:16:09 -0700 |
commit | fd4eed117dbbb743949bcda8acef6de1340747da (patch) | |
tree | 97e787e50eb4f2a79afd24576e7d3676abdf6dd5 /var | |
parent | 6a730d7059aae848fb718212ed1f072a7aeca709 (diff) | |
download | spack-fd4eed117dbbb743949bcda8acef6de1340747da.tar.gz spack-fd4eed117dbbb743949bcda8acef6de1340747da.tar.bz2 spack-fd4eed117dbbb743949bcda8acef6de1340747da.tar.xz spack-fd4eed117dbbb743949bcda8acef6de1340747da.zip |
ESMF & NCL packages: Bug fixes for Intel Compilers (#11923)
* esmf: add patch when building with intel for 7.0.x
* esmf: set Makefile variables required to propagate CXX/F90 flags
* ncl: add ymake patch for @6.4.0:
* ncl: add pixman, bzip2, freetype dependencies
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/esmf/intel.patch | 17 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/esmf/package.py | 15 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ncl/package.py | 17 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ncl/ymake.patch | 16 |
4 files changed, 59 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/esmf/intel.patch b/var/spack/repos/builtin/packages/esmf/intel.patch new file mode 100644 index 0000000000..ab955d8c52 --- /dev/null +++ b/var/spack/repos/builtin/packages/esmf/intel.patch @@ -0,0 +1,17 @@ +--- old/build_config/Linux.intel.default/build_rules.mk 2019-06-27 15:55:30.857527494 -0400 ++++ new/build_config/Linux.intel.default/build_rules.mk 2019-06-27 15:56:13.007089627 -0400 +@@ -187,10 +187,10 @@ + ############################################################ + # OpenMP compiler and linker flags + # +-ESMF_OPENMP_F90COMPILEOPTS += -openmp +-ESMF_OPENMP_CXXCOMPILEOPTS += -openmp +-ESMF_OPENMP_F90LINKOPTS += -openmp +-ESMF_OPENMP_CXXLINKOPTS += -openmp ++ESMF_OPENMP_F90COMPILEOPTS += -qopenmp ++ESMF_OPENMP_CXXCOMPILEOPTS += -qopenmp ++ESMF_OPENMP_F90LINKOPTS += -qopenmp ++ESMF_OPENMP_CXXLINKOPTS += -qopenmp + + ############################################################ + # Set rpath syntax diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py index a838f7c0f5..40819ade05 100644 --- a/var/spack/repos/builtin/packages/esmf/package.py +++ b/var/spack/repos/builtin/packages/esmf/package.py @@ -43,6 +43,8 @@ class Esmf(MakefilePackage): # Testing dependencies depends_on('perl', type='test') + # Make esmf build with newer intel versions + patch('intel.patch', when='@:7.0.99 %intel@17:') # Make esmf build with newer gcc versions # https://sourceforge.net/p/esmf/esmf/ci/3706bf758012daebadef83d6575c477aeff9c89b/ patch('gcc.patch', when='@:7.0.99 %gcc@6:') @@ -96,6 +98,19 @@ class Esmf(MakefilePackage): os.environ['ESMF_INSTALL_LIBDIR'] = 'lib' os.environ['ESMF_INSTALL_MODDIR'] = 'include' + # Allow compiler flags to carry through from compiler spec + os.environ['ESMF_CXXCOMPILEOPTS'] = \ + ' '.join(spec.compiler_flags['cxxflags']) + os.environ['ESMF_F90COMPILEOPTS'] = \ + ' '.join(spec.compiler_flags['fflags']) + # ESMF will simply not build with Intel using backing GCC 8, in that + # case you need to point to something older, below is commented but is + # an example + # os.environ['ESMF_CXXCOMPILEOPTS'] = \ + # '-O2 -std=c++11 -gcc-name=/usr/bin/gcc' + # os.environ['ESMF_F90COMPILEOPTS'] = \ + # '-O2 -gcc-name=/usr/bin/gcc' + ############ # Compiler # ############ diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index aa4499c1c6..bbf84b8cd0 100644 --- a/var/spack/repos/builtin/packages/ncl/package.py +++ b/var/spack/repos/builtin/packages/ncl/package.py @@ -28,6 +28,8 @@ class Ncl(Package): patch('hdf5.patch', when="@6.4.0") # ymake-filter's buffer may overflow (upstream as of 6.5.0) patch('ymake-filter.patch', when="@6.4.0") + # ymake additional local library and includes will be filtered improperly + patch('ymake.patch', when="@6.4.0:") # This installation script is implemented according to this manual: # http://www.ncl.ucar.edu/Download/build_from_src.shtml @@ -59,6 +61,9 @@ class Ncl(Package): depends_on('libx11') depends_on('libxaw') depends_on('libxmu') + depends_on('pixman') + depends_on('bzip2') + depends_on('freetype') # In Spack, we do not have an option to compile netcdf without netcdf-4 # support, so we will tell the ncl configuration script that we want @@ -171,9 +176,9 @@ class Ncl(Package): # Build NCL? 'y\n', # Parent installation directory : - '\'' + self.spec.prefix + '\'\n', + self.spec.prefix + '\n', # System temp space directory : - '\'' + tempfile.gettempdir() + '\'\n', + tempfile.gettempdir() + '\n', # Build NetCDF4 feature support (optional)? 'y\n' ] @@ -219,12 +224,12 @@ class Ncl(Package): # Build GRIB2 support (optional) into NCL? 'n\n', # Enter local library search path(s) : - # The paths will be passed by the Spack wrapper. - ' \n', + self.spec['pixman'].prefix.lib + ' ' + + self.spec['bzip2'].prefix.lib + '\n', # Enter local include search path(s) : # All other paths will be passed by the Spack wrapper. - '\'' + join_path(self.spec['freetype'].prefix.include, - 'freetype2') + '\'\n', + join_path(self.spec['freetype'].prefix.include, 'freetype2') + + '\n', # Go back and make more changes or review? 'n\n', # Save current configuration? diff --git a/var/spack/repos/builtin/packages/ncl/ymake.patch b/var/spack/repos/builtin/packages/ncl/ymake.patch new file mode 100644 index 0000000000..d989351b23 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncl/ymake.patch @@ -0,0 +1,16 @@ +diff --git a/config/ymake b/config/ymake +index 7b785bc..ca24dba 100755 +--- a/config/ymake ++++ b/config/ymake +@@ -649,6 +649,11 @@ case UNICOS: + set cppopt = -N + breaksw + case Linux: ++ set cppopt = -traditional-cpp ++ # because local libraries and includes will otherwise have this prefix ++ # '1-rhel7-1' instead of 'linux-rhel7-x86_64' ++ set defines = "$defines -Dlinux=linux -Dx86_64=x86_64" ++ breaksw + case FreeBSD: + case CYGWIN: + set cppopt = -traditional-cpp |