Skip to content
Snippets Groups Projects
Commit d24186ea authored by Adam J. Stewart's avatar Adam J. Stewart Committed by Todd Gamblin
Browse files

Update PnetCDF to AutotoolsPackage (#2637)

parent d8efeabf
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
from spack import *
class ParallelNetcdf(Package):
class ParallelNetcdf(AutotoolsPackage):
"""Parallel netCDF (PnetCDF) is a library providing high-performance
parallel I/O while still maintaining file-format compatibility with
Unidata's NetCDF."""
......@@ -41,13 +41,17 @@ class ParallelNetcdf(Package):
variant('fpic', default=True,
description='Produce position-independent code (for shared libs)')
depends_on("m4", type='build')
depends_on("mpi")
depends_on('mpi')
depends_on('m4', type='build')
# See:
# https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
def install(self, spec, prefix):
args = list()
def configure_args(self):
spec = self.spec
args = ['--with-mpi={0}'.format(spec['mpi'].prefix)]
if '+fpic' in spec:
args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC'])
if '~cxx' in spec:
......@@ -55,8 +59,4 @@ def install(self, spec, prefix):
if '~fortran' in spec:
args.append('--disable-fortran')
args.extend(["--prefix=%s" % prefix,
"--with-mpi=%s" % spec['mpi'].prefix])
configure(*args)
make()
make("install")
return args
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment