Skip to content

Commit

Permalink
gromacs: make it possible to disable single precision as build target.
Browse files Browse the repository at this point in the history
  • Loading branch information
akesandgren committed Nov 7, 2024
1 parent 5092c2d commit 539af08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion easybuild/easyblocks/g/gromacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': [None, "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],
Expand Down Expand Up @@ -744,10 +746,15 @@ def run_all_steps(self, *args, **kwargs):
'mpi': 'install'
}

precisions = ['single']
precisions = []
if self.cfg.get('single_precision') is None or 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')
Expand Down

0 comments on commit 539af08

Please sign in to comment.