From 14f3f03b625a9723611dedb0d0c63905535b92b3 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Tue, 16 Nov 2021 15:34:23 +0100 Subject: [PATCH 1/2] add option to ignore PLUMED version check for GROMACS --- easybuild/easyblocks/g/gromacs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/g/gromacs.py b/easybuild/easyblocks/g/gromacs.py index 343a63f353..77cc29df05 100644 --- a/easybuild/easyblocks/g/gromacs.py +++ b/easybuild/easyblocks/g/gromacs.py @@ -67,6 +67,7 @@ def extra_options(): 'mpiexec': ['mpirun', "MPI executable to use when running tests", CUSTOM], 'mpiexec_numproc_flag': ['-np', "Flag to introduce the number of MPI tasks when running tests", CUSTOM], 'mpi_numprocs': [0, "Number of MPI tasks to use when running tests", CUSTOM], + 'ignore_plumed_version_check': [False, "Ignore the version compatibility check for PLUMED", CUSTOM], }) extra_vars['separate_build_dir'][0] = True return extra_vars @@ -202,8 +203,13 @@ def configure_step(self): (out, _) = run_cmd("plumed-patch -l", log_all=True, simple=False) if not re.search(engine, out): - raise EasyBuildError("There is no support in PLUMED version %s for GROMACS %s: %s", - get_software_version('PLUMED'), self.version, out) + msg = "There is no support in PLUMED version %s for GROMACS %s: %s" % ( + get_software_version('PLUMED'), self.version, out + ) + if self.cfg['ignore_plumed_version_check']: + self.log.warning(msg) + else: + raise EasyBuildError(msg) # PLUMED patching must be done at different stages depending on # version of GROMACS. Just prepare first part of cmd here From ecee423de969aa9964fc377708f0774b24a3300c Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Wed, 24 Nov 2021 11:36:19 +0100 Subject: [PATCH 2/2] improve formatting --- easybuild/easyblocks/g/gromacs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/g/gromacs.py b/easybuild/easyblocks/g/gromacs.py index 77cc29df05..67eec7b826 100644 --- a/easybuild/easyblocks/g/gromacs.py +++ b/easybuild/easyblocks/g/gromacs.py @@ -203,9 +203,8 @@ def configure_step(self): (out, _) = run_cmd("plumed-patch -l", log_all=True, simple=False) if not re.search(engine, out): - msg = "There is no support in PLUMED version %s for GROMACS %s: %s" % ( - get_software_version('PLUMED'), self.version, out - ) + plumed_ver = get_software_version('PLUMED') + msg = "There is no support in PLUMED version %s for GROMACS %s: %s" % (plumed_ver, self.version, out) if self.cfg['ignore_plumed_version_check']: self.log.warning(msg) else: