Skip to content

Commit

Permalink
run band.nw with 1 rank; set parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Moors committed Dec 10, 2023
1 parent e0bfdab commit 440f9e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion easybuild/easyblocks/n/nwchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ def test_cases_step(self):
test_cases_logfn = os.path.join(self.installdir, config.log_path(), 'test_cases.log')
test_cases_log = open(test_cases_logfn, "w")

# ensure parallel is set in case check_readiness_step is skipped (e.g. with --sanity-check-only)
if not self.cfg['parallel']:
self.set_parallel()

for (testdir, tests) in self.cfg['tests']:

# run test in a temporary dir
Expand All @@ -472,8 +476,11 @@ def test_cases_step(self):
copy_file(test_file, tmpdir)

# run tests
n_mpi_ranks = min(self.cfg['parallel'], 4)
for testx in tests:
if testx == 'band.nw' and LooseVersion(self.version) < LooseVersion("7.2"):
n_mpi_ranks = 1
else:
n_mpi_ranks = min(self.cfg['parallel'], 4)
cmd = '%s %s' % (self.toolchain.mpi_cmd_for('nwchem', n_mpi_ranks), testx)
msg = "Running test '%s' (from %s) in %s..." % (cmd, testdir, tmpdir)
self.log.info(msg)
Expand Down

0 comments on commit 440f9e4

Please sign in to comment.