From 42f5341810bfa11eaf11b35853f6c74e3a218b4b Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 11 Oct 2018 10:48:42 +0200 Subject: [PATCH] serial netCDF - added --- HDF5_serial/netcdf/build | 57 +++++++++++++++++++++++++++++++ HDF5_serial/netcdf/files/variants | 2 ++ HDF5_serial/netcdf/modulefile | 12 +++++++ 3 files changed, 71 insertions(+) create mode 100755 HDF5_serial/netcdf/build create mode 100644 HDF5_serial/netcdf/files/variants create mode 100644 HDF5_serial/netcdf/modulefile diff --git a/HDF5_serial/netcdf/build b/HDF5_serial/netcdf/build new file mode 100755 index 0000000..9ccc8fe --- /dev/null +++ b/HDF5_serial/netcdf/build @@ -0,0 +1,57 @@ +#!/usr/bin/env modbuild + +pbuild::set_download_url "https://www.unidata.ucar.edu/downloads/$P/ftp/$P-$V.tar.gz" +pbuild::add_to_group 'HDF5_serial' +pbuild::install_docfiles 'COPYRIGHT' 'README.md' 'RELEASE_NOTES.md' + +pbuild::pre_configure() { + pbuild::add_configure_args "--enable-netcdf-4" + pbuild::add_configure_args "--with-pic" + pbuild::add_configure_args "--enable-remote-fortran-bootstrap" + #pbuild::add_configure_args "--disable-shared" + case "${COMPILER}" in + pgi ) + # PGI uses GCC's include files, some object files and + # the STL implementation! + # The PGI C pre-processor is broken and doesn't work + # for HDF5. We use the pre-processor of the underlying + # GCC... + # This is a bit hackish! + # + # The following eval sets GCCDIR! Which is something + # like: + # /opt/psi/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 + # + eval $(pgcc -show 2>/dev/null | \ + awk '/^GCCDIR[[:space:]]*=/{gsub(/[[:space:]]/,""); print $0}') + pbuild::add_configure_args "CPP=${GCCDIR%%/..*}/cpp" + pbuild::add_configure_args "CC=pgcc" + pbuild::add_configure_args "CXX=pgc++" + pbuild::add_configure_args "FC=pgf90" + pbuild::add_configure_args "CFLAGS=-fPIC" + pbuild::add_configure_args "CXXFLAGS=-fPIC" + pbuild::add_configure_args "FCFLAGS=-fPIC" + ;; + * ) + : + ;; + esac +} + +pbuild::compile() { + make check + make + make install + # configure requires libnetcdf + LIBRARY_PATH+=":${BUILD_DIR}/liblib/.libs" + LD_LIBRARY_PATH+=":${BUILD_DIR}/liblib/.libs" + make build-netcdf-fortran + make install-netcdf-fortran +} + +pbuild::install() { + : +} + +pbuild::make_all + diff --git a/HDF5_serial/netcdf/files/variants b/HDF5_serial/netcdf/files/variants new file mode 100644 index 0000000..2ac943b --- /dev/null +++ b/HDF5_serial/netcdf/files/variants @@ -0,0 +1,2 @@ +netcdf/4.6.1 unstable pgi/18.5 hdf5_serial/1.10.2 +netcdf/4.6.1 unstable gcc/7.3.0 hdf5_serial/1.10.2 diff --git a/HDF5_serial/netcdf/modulefile b/HDF5_serial/netcdf/modulefile new file mode 100644 index 0000000..f8ea05c --- /dev/null +++ b/HDF5_serial/netcdf/modulefile @@ -0,0 +1,12 @@ +#%Module1.0 + +module-whatis "Network Common Data Form" +module-url "http://www.unidata.ucar.edu/software/netcdf/" +module-license "BSD-like, see \${NETCDF_DIR}/share/doc/netcdf/COPYRIGHT" +module-maintainer "Achim Gsell " + +module-help " +NetCDF is a set of software libraries and self-describing, machine- +independent data formats that support the creation, access, and +sharing of array-oriented scientific data. +"