From 3c5024232c48faa320a266298b656a148bee1aa1 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 17 Feb 2017 20:46:58 +0100 Subject: abinit: fix compilation on macOS, disable internal netcdf (#3157) * abinit: fix compilation on macOS * disable internal netcdf --- var/spack/repos/builtin/packages/abinit/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 76fa044982..ff27f69723 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -25,7 +25,6 @@ # # Author: Matteo Giantomassi # Date: October 11, 2016 - from spack import * @@ -63,6 +62,10 @@ class Abinit(Package): # TODO: To be tested. # It was working before the last `git pull` but now all tests crash. # For the time being, the default is netcdf3 and the internal fallbacks + # FIXME: rename (trio?) and use multivalued variants to cover + # --with-trio-flavor={netcdf, none} + # Note that Abinit@8: does not support etsf_io anymore because it is not + # compatible with HDF5 and MPI-IO variant('hdf5', default=False, description='Enables HDF5+Netcdf4 with MPI. WARNING: experimental') @@ -156,6 +159,8 @@ class Abinit(Package): # Netcdf4/HDF5 if "+hdf5" in spec: oapp("--with-trio-flavor=netcdf") + # Since version 8, Abinit started to use netcdf4 + hdf5 and we have + # to link with -lhdf5_hl -lhdf5 hdf_libs = "-L%s -lhdf5_hl -lhdf5" % spec["hdf5"].prefix.lib options.extend([ "--with-netcdf-incs=-I%s" % ( @@ -164,8 +169,9 @@ class Abinit(Package): spec["netcdf-fortran"].prefix.lib, hdf_libs), ]) else: - # Use internal fallbacks (netcdf3) - oapp("--with-trio-flavor=netcdf-fallback") + # In Spack we do our best to avoid building any internally provided + # dependencies, such as netcdf3 in this case. + oapp("--with-trio-flavor=none") configure(*options) make() -- cgit v1.2.3-70-g09d2