Skip to content

Commit 6d4b4be

Browse files
committed
Adjust gromacs easyblock for 2025b
CMake (>3.10) uses MPIEXEC_EXECUTABLE instead of MPIEXEC to specify the launcher used for MPI programs. If FlexiBLAS and MKL are loaded it's reasonable to assume that MKL should be loaded through FlexiBLAS instead of always being used to build and run GROMACS.
1 parent 917cea3 commit 6d4b4be

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

easybuild/easyblocks/g/gromacs.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ def configure_step(self):
310310
if mpiexec:
311311
mpiexec_path = which(mpiexec)
312312
if mpiexec_path:
313-
self.cfg.update('configopts', "-DMPIEXEC=%s" % mpiexec_path)
313+
cmake_version = get_software_version("CMake")
314+
if cmake_version >= '3.10':
315+
self.cfg.update('configopts', "-DMPIEXEC_EXECUTABLE=%s" % mpiexec_path)
316+
else:
317+
self.cfg.update('configopts', "-DMPIEXEC=%s" % mpiexec_path)
314318
self.cfg.update('configopts', "-DMPIEXEC_NUMPROC_FLAG=%s" %
315319
self.cfg.get('mpiexec_numproc_flag'))
316320
self.cfg.update('configopts', "-DNUMPROC=%s" % mpi_numprocs)
@@ -388,8 +392,8 @@ def configure_step(self):
388392
else:
389393
self.cfg.update('configopts', "-DGMX_OPENMP=OFF")
390394

391-
imkl_root = get_software_root('imkl')
392-
if imkl_root:
395+
imkl_direct = get_software_root("imkl") and not get_software_root("FlexiBLAS")
396+
if imkl_direct:
393397
# using MKL for FFT, so it will also be used for BLAS/LAPACK
394398
imkl_include = os.path.join(os.getenv('MKLROOT'), 'mkl', 'include')
395399
self.cfg.update('configopts', '-DGMX_FFT_LIBRARY=mkl -DMKL_INCLUDE_DIR="%s" ' % imkl_include)

0 commit comments

Comments
 (0)