Skip to content

Commit

Permalink
Merge pull request #3501 from akesandgren/20241107124117_new_pr_gromacs
Browse files Browse the repository at this point in the history
gromacs: make it possible to disable single precision as build target.
  • Loading branch information
Micket authored Nov 13, 2024
2 parents 28b2084 + 2739cf0 commit 57c0eae
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': [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],
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'):
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 57c0eae

Please sign in to comment.