Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions easybuild/easyblocks/a/amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,13 @@ def install_step(self):

super().install_step()

# Run the tests located in the build directory
# Run the tests
if self.cfg['runtest']:
if LooseVersion(self.version) >= LooseVersion('24'):
testdir = os.path.join(self.builddir, 'test')
if self.name == 'AmberTools':
testdir = os.path.join(self.builddir, 'AmberTools', 'test')
elif self.name == 'Amber':
testdir = os.path.join(self.builddir, 'test')
testname_cs = 'test.cuda.serial'
testname_cp = 'test.cuda.parallel'
else:
Expand All @@ -341,12 +344,16 @@ def install_step(self):
pretestcommands = 'source %s/amber.sh && cd %s' % (self.installdir, testdir)

# serial tests
run_shell_cmd("%s && make test.serial" % pretestcommands)
if LooseVersion(self.version) >= LooseVersion('24'):
run_shell_cmd("%s && make test" % pretestcommands)
else:
run_shell_cmd("%s && make test.serial" % pretestcommands)
if self.with_cuda:
res = run_shell_cmd(f"{pretestcommands} && make {testname_cs}")
if res.exit_code > 0:
self.log.warning("Check the output of the Amber cuda tests for possible failures")

# parallel tests
if self.with_mpi:
# Hard-code parallel tests to use 4 threads
env.setvar("DO_PARALLEL", self.toolchain.mpi_cmd_for('', 4))
Expand All @@ -373,11 +380,15 @@ def sanity_check_step(self):
binaries.append('pmemd.cuda.MPI')
else:
binaries.append('pmemd.cuda_DPFP.MPI')
if self.name == 'AmberTools':
binaries.append('gem.pmemd')

if self.with_mpi:
binaries.extend(['sander.MPI'])
if self.name == 'Amber':
binaries.append('pmemd.MPI')
if self.name == 'AmberTools':
binaries.append('gem.pmemd.MPI')

custom_paths = {
'files': [os.path.join(self.installdir, 'bin', binary) for binary in binaries],
Expand Down