Skip to content
Snippets Groups Projects
Commit 5c1a4d1b authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

Fix sda and add test

parent c504eb57
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,9 @@ class Apbs(CMakePackage):
# add suite-sparse libs to path because tests can't find them
env.prepend_path("LD_LIBRARY_PATH", self.spec['suite-sparse'].prefix.lib)
def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_build_environment(env)
@run_after('install')
@on_package_attributes(run_tests=True)
def install_test(self):
......
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2023 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)
......@@ -27,8 +27,9 @@ class Sda(MakefilePackage):
version('7.3.3d', sha256='295ca0142532759a43375422a4ebc050e15b1c248e45493f5864765a9fe8076f')
# Dependencies.
depends_on('apbs', type=('build','run'))
depends_on('python@3.8:', type=('build','run'))
conflicts('%gcc@:9.3.999', when='@7.3.3d')
conflicts('%gcc@:9.3', when='@7.3.3d')
conflicts('%intel')
build_directory = 'src'
......@@ -42,9 +43,21 @@ class Sda(MakefilePackage):
makefile.filter(r'\${CC_plus}', '${CXX}')
makefile.filter(r'^\s*CC_moins\s*=.*', 'CC = ' + spack_cc)
makefile.filter(r'\${CC_moins}', '${CC}')
@property
def install_targets(self):
build_directory = 'sda_flex-7.3.3d/src/'
targets = ['init libsda sda_flex tools auxi clust test_module']
return ['prefix={0}'.format(self.prefix), 'install']
def install(self, spec, prefix):
install_tree('auxi', prefix.auxi)
install_tree('bin', prefix.bin)
install_tree('examples', prefix.examples)
install_tree('lib', prefix.lib)
install_tree('src', prefix.src)
@run_after('install')
def test_install(self):
# prepare grid
with working_dir(self.prefix.examples + '/lysozymes/prepare_grids_and_ecm'):
run_script = Executable('bash')
run_script('./run_ed_hd_ecm.sh')
# run random test
with working_dir(self.prefix.examples + '/lysozymes/unit_test'):
test = Executable(self.prefix.bin.test_force_energy2)
test('128_lysph6_2interactions.in')
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment