diff --git a/easybuild/easyblocks/g/gromacs.py b/easybuild/easyblocks/g/gromacs.py index b73f36ce18..4450448b86 100644 --- a/easybuild/easyblocks/g/gromacs.py +++ b/easybuild/easyblocks/g/gromacs.py @@ -63,6 +63,8 @@ def extra_options(): extra_vars.update({ 'double_precision': [None, "Build with double precision enabled (-DGMX_DOUBLE=ON), " + "default is to build double precision unless CUDA is enabled", CUSTOM], + 'single_precision': [True, "Build with single precision enabled (-DGMX_DOUBLE=OFF), " + + "default is to build single precision", CUSTOM], 'mpisuffix': ['_mpi', "Suffix to append to MPI-enabled executables (only for GROMACS < 4.6)", CUSTOM], '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], @@ -744,10 +746,15 @@ def run_all_steps(self, *args, **kwargs): 'mpi': 'install' } - precisions = ['single'] + precisions = [] + if self.cfg.get('single_precision'): + precisions.append('single') if self.cfg.get('double_precision') is None or self.cfg.get('double_precision'): precisions.append('double') + if precisions == []: + raise EasyBuildError("No precision selected. At least one of single/double_precision must be unset or True") + mpitypes = ['nompi'] if self.toolchain.options.get('usempi', None): mpitypes.append('mpi')