summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2017-02-17 20:46:58 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2017-02-17 11:46:58 -0800
commit3c5024232c48faa320a266298b656a148bee1aa1 (patch)
treec1d8f1457e726334f9a946f52419cb2feca2bf33
parent0f51daff24717d1837227f6630b20a2f6472dfdb (diff)
downloadspack-3c5024232c48faa320a266298b656a148bee1aa1.tar.gz
spack-3c5024232c48faa320a266298b656a148bee1aa1.tar.bz2
spack-3c5024232c48faa320a266298b656a148bee1aa1.tar.xz
spack-3c5024232c48faa320a266298b656a148bee1aa1.zip
abinit: fix compilation on macOS, disable internal netcdf (#3157)
* abinit: fix compilation on macOS * disable internal netcdf
-rw-r--r--var/spack/repos/builtin/packages/abinit/package.py12
1 files 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 <matteo.giantomassiNOSPAM AT uclouvain.be>
# 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()