From 440f9e479b17354c74c258463ab701e66afe0b21 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Sun, 10 Dec 2023 19:08:34 +0100 Subject: [PATCH] run band.nw with 1 rank; set parallel --- easybuild/easyblocks/n/nwchem.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/n/nwchem.py b/easybuild/easyblocks/n/nwchem.py index 3fa9c8cb33..dc69fedca4 100644 --- a/easybuild/easyblocks/n/nwchem.py +++ b/easybuild/easyblocks/n/nwchem.py @@ -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 @@ -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)