Skip to content

Commit 28bb479

Browse files
authored
Merge pull request #3959 from jhmeinke/gromacs-easyblock-2025
Fix MPIEXEC and improve handling of FlexiBLAS in gromacs.py
2 parents 917cea3 + 6d4b4be commit 28bb479

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)