2016-05-11 21:22:25 -07:00
|
|
|
##############################################################################
|
2017-09-07 05:44:16 +02:00
|
|
|
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
|
2016-05-11 21:22:25 -07:00
|
|
|
# Produced at the Lawrence Livermore National Laboratory.
|
|
|
|
#
|
|
|
|
# This file is part of Spack.
|
|
|
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
|
|
|
# LLNL-CODE-647188
|
|
|
|
#
|
2017-11-04 17:08:04 -07:00
|
|
|
# For details, see https://github.com/spack/spack
|
2017-06-24 22:22:55 -07:00
|
|
|
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
|
2016-05-11 21:22:25 -07:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License (as
|
|
|
|
# published by the Free Software Foundation) version 2.1, February 1999.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
|
|
|
# conditions of the GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
##############################################################################
|
2016-01-28 15:41:58 -06:00
|
|
|
from spack import *
|
|
|
|
|
2016-08-10 01:50:00 -07:00
|
|
|
|
2016-12-19 16:26:47 -06:00
|
|
|
class ParallelNetcdf(AutotoolsPackage):
|
2016-01-28 15:41:58 -06:00
|
|
|
"""Parallel netCDF (PnetCDF) is a library providing high-performance
|
|
|
|
parallel I/O while still maintaining file-format compatibility with
|
|
|
|
Unidata's NetCDF."""
|
|
|
|
|
|
|
|
homepage = "https://trac.mcs.anl.gov/projects/parallel-netcdf"
|
|
|
|
url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.6.1.tar.gz"
|
2017-01-23 17:30:01 -06:00
|
|
|
list_url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/download.html"
|
2016-01-28 15:41:58 -06:00
|
|
|
|
2017-01-23 17:30:01 -06:00
|
|
|
version('1.8.0', '825825481aa629eb82f21ca37afff1609b8eeb07')
|
2016-04-12 16:53:45 -05:00
|
|
|
version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0')
|
2016-01-28 15:41:58 -06:00
|
|
|
version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34')
|
|
|
|
|
2016-04-15 15:57:54 -04:00
|
|
|
variant('cxx', default=True, description='Build the C++ Interface')
|
|
|
|
variant('fortran', default=True, description='Build the Fortran Interface')
|
2017-08-04 18:21:43 +02:00
|
|
|
variant('pic', default=True,
|
2016-08-10 01:50:00 -07:00
|
|
|
description='Produce position-independent code (for shared libs)')
|
2016-04-15 15:57:54 -04:00
|
|
|
|
2016-12-19 16:26:47 -06:00
|
|
|
depends_on('mpi')
|
|
|
|
|
|
|
|
depends_on('m4', type='build')
|
2016-01-28 15:41:58 -06:00
|
|
|
|
2016-08-10 01:50:00 -07:00
|
|
|
# See:
|
|
|
|
# https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
|
2016-12-19 16:26:47 -06:00
|
|
|
def configure_args(self):
|
|
|
|
spec = self.spec
|
|
|
|
|
|
|
|
args = ['--with-mpi={0}'.format(spec['mpi'].prefix)]
|
2017-11-22 22:34:21 -07:00
|
|
|
args.append('MPICC={0}'.format(spec['mpi'].mpicc))
|
|
|
|
args.append('MPICXX={0}'.format(spec['mpi'].mpicxx))
|
|
|
|
args.append('MPIF77={0}'.format(spec['mpi'].mpifc))
|
|
|
|
args.append('MPIF90={0}'.format(spec['mpi'].mpifc))
|
2017-08-04 18:21:43 +02:00
|
|
|
args.append('SEQ_CC={0}'.format(spack_cc))
|
|
|
|
|
|
|
|
if '+pic' in spec:
|
|
|
|
args.extend([
|
|
|
|
'CFLAGS={0}'.format(self.compiler.pic_flag),
|
|
|
|
'CXXFLAGS={0}'.format(self.compiler.pic_flag),
|
|
|
|
'FFLAGS={0}'.format(self.compiler.pic_flag)
|
|
|
|
])
|
2016-12-19 16:26:47 -06:00
|
|
|
|
2016-04-15 15:57:54 -04:00
|
|
|
if '~cxx' in spec:
|
|
|
|
args.append('--disable-cxx')
|
2017-08-04 18:21:43 +02:00
|
|
|
|
2016-04-15 15:57:54 -04:00
|
|
|
if '~fortran' in spec:
|
|
|
|
args.append('--disable-fortran')
|
|
|
|
|
2016-12-19 16:26:47 -06:00
|
|
|
return args
|