summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorbecker33 <becker33@llnl.gov>2016-08-16 10:49:41 -0700
committerGitHub <noreply@github.com>2016-08-16 10:49:41 -0700
commite8afbfbce794686054531e94e793e2bcfc4d3a51 (patch)
tree006a85f3d62cf4b7c5b55b9f6de69fb26b7f2288 /var
parentae20e53cfba0f5689c72657a022295442dd4134e (diff)
parent9509c1006451b14e42df364ba61eb5f412d5ae3a (diff)
downloadspack-e8afbfbce794686054531e94e793e2bcfc4d3a51.tar.gz
spack-e8afbfbce794686054531e94e793e2bcfc4d3a51.tar.bz2
spack-e8afbfbce794686054531e94e793e2bcfc4d3a51.tar.xz
spack-e8afbfbce794686054531e94e793e2bcfc4d3a51.zip
Merge pull request #1530 from davydden/pkg/octopus
octopus: new package
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/octopus/package.py86
1 files changed, 86 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py
new file mode 100644
index 0000000000..6fa2e0368f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/octopus/package.py
@@ -0,0 +1,86 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# 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
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# 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
+##############################################################################
+from spack import *
+
+
+class Octopus(Package):
+ """A real-space finite-difference (time-dependent) density-functional
+ theory code."""
+
+ homepage = "http://www.tddft.org/programs/octopus/"
+ url = "http://www.tddft.org/programs/octopus/down.php?file=5.0.1/octopus-5.0.1.tar.gz"
+
+ version('5.0.1', '2b6392ab67b843f9d4ca7413fc07e822')
+
+ depends_on('blas')
+ depends_on('gsl')
+ depends_on('lapack')
+ depends_on('libxc')
+ depends_on('mpi')
+ depends_on('fftw+mpi')
+
+ # optional dependencies:
+ # TODO: scalapack, metis, parmetis, netcdf, etsf_io, SPARSKIT, ARPACK,
+ # FEAST, Libfm, PFFT, ISF, PNFFT
+
+ def install(self, spec, prefix):
+ args = []
+ args.extend([
+ '--prefix=%s' % prefix,
+ '--with-blas=%s' % to_link_flags(
+ spec['blas'].blas_shared_lib),
+ '--with-lapack=%s' % to_link_flags(
+ spec['lapack'].lapack_shared_lib),
+ '--with-gsl-prefix=%s' % spec['gsl'].prefix,
+ '--with-libxc-prefix=%s' % spec['libxc'].prefix,
+ 'CC=%s' % spec['mpi'].mpicc,
+ 'FC=%s' % spec['mpi'].mpifc,
+ '--enable-mpi',
+ '--with-fft-lib=-L%s -lfftw3' % spec['fftw'].prefix.lib
+ # --with-blacs=${prefix}/lib/libscalapack.dylib
+ # --with-netcdf-prefix=netcdf-fortran
+ # --with-etsf-io-prefix=
+ # --with-sparskit=${prefix}/lib/libskit.a
+ # --with-pfft-prefix=${prefix} --with-mpifftw-prefix=${prefix}
+ # --with-arpack=${prefix}/lib/libarpack.dylib
+ # --with-parpack=${prefix}/lib/libparpack.dylib
+ # --with-metis-prefix=${prefix} --with-parmetis-prefix=${prefix}
+ # --with-berkeleygw-prefix=${prefix}
+ ])
+
+ # Supposedly configure does not pick up the required flags for gfortran
+ # Without it there are:
+ # Error: Line truncated @ global.F90:157:132
+ # Error: Unterminated character constant @ global.F90:157:20
+ if spec.satisfies('%clang') or spec.satisfies('%gcc'):
+ args.extend([
+ 'FCFLAGS=-O2 -ffree-line-length-none'
+ ])
+
+ configure(*args)
+ make()
+ # short tests take forever...
+ # make('check-short')
+ make('install')