summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToyohisa Kameyama <kameyama@riken.jp>2021-03-22 19:07:07 +0900
committerGitHub <noreply@github.com>2021-03-22 04:07:07 -0600
commitc77267f0a15e72cee2db73eb9e75f9c60ed9024b (patch)
tree9264fef4fb42157526ed757ae22b42b05497983e
parentd49c0148b84b99a40a55b6f2668704435fe7f38d (diff)
downloadspack-c77267f0a15e72cee2db73eb9e75f9c60ed9024b.tar.gz
spack-c77267f0a15e72cee2db73eb9e75f9c60ed9024b.tar.bz2
spack-c77267f0a15e72cee2db73eb9e75f9c60ed9024b.tar.xz
spack-c77267f0a15e72cee2db73eb9e75f9c60ed9024b.zip
dtf: new package. (#22446)
-rw-r--r--var/spack/repos/builtin/packages/dtf/package.py64
1 files changed, 64 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dtf/package.py b/var/spack/repos/builtin/packages/dtf/package.py
new file mode 100644
index 0000000000..e1c590c657
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dtf/package.py
@@ -0,0 +1,64 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Dtf(AutotoolsPackage):
+ """DTF (Data Transfer Framework) is a general I/O arbitration
+ middleware designed for multi-component applications that use
+ file-base component coupling.
+
+ DTF works for applications that use the Parallel netCDF (PnetCDF)
+ library for file I/O. It allows the user to transparently replace
+ file I/O with sending the data directly between the components.
+ """
+
+ homepage = "https://github.com/maneka07/DTF"
+ git = "https://github.com/maneka07/DTF.git"
+
+ version('master', branch='master')
+
+ variant('cxx', default=True, description='Build pnetcdf the C++ Interface')
+ variant('fortran', default=True, description='Build pnetcdf the Fortran Interface')
+
+ depends_on('mpi')
+ depends_on('m4', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('perl', type='build')
+
+ configure_directory = 'pnetcdf'
+
+ def setup_build_environment(self, env):
+ dtf_srcdir = join_path(self.stage.source_path, 'libdtf')
+ env.append_path('LD_LIBRARY_PATH', self.prefix.lib)
+ env.append_path('LD_LIBRARY_PATH', dtf_srcdir)
+
+ @run_before('autoreconf')
+ def build_dtf(self):
+ with working_dir('libdtf'):
+ make('all', 'MPICC={0}'.format(self.spec['mpi'].mpicc))
+
+ def configure_args(self):
+ dtf_srcdir = join_path(self.stage.source_path, 'libdtf')
+ args = [
+ 'CFLAGS=-I{0}'.format(dtf_srcdir),
+ 'LDFLAGS=-L{0} -ldtf'.format(dtf_srcdir)
+ ]
+ args += self.enable_or_disable('cxx')
+ args += self.enable_or_disable('fortran')
+ return args
+
+ def install(self, spec, prefix):
+ with working_dir('pnetcdf'):
+ make('install')
+ with working_dir('libdtf'):
+ install('libdtf.*', prefix.lib)
+ install('dtf.h', prefix.include)
+ install_tree('doc', prefix.doc)
+ install_tree('example', prefix.example)
+ install('COPYRIGHT', prefix)