GROMACS/2023-dev-cpeGNU-22.08-MPI-GPU (GROMACS-2023-dev-cpeGNU-22.08-MPI-GPU.eb)
This software is archived in the LUMI-EasyBuild-contrib GitHub repository as easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-2023-dev-cpeGNU-22.08-MPI-GPU.eb. The corresponding module would be GROMACS/2023-dev-cpeGNU-22.08-MPI-GPU.
# Contributed by Luca Marsella and Victor Holanda Rusu (CSCS)
#
# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
#
# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University
# Authors:: Wiktor Jurkowski <wiktor.jurkowski@uni.lu>, Fotis Georgatos <fotis.georgatos@uni.lu>, \
# George Tsouloupas <g.tsouloupas@cyi.ac.cy>, Kenneth Hoste
# License:: MIT/GPL
# $Id$
#
# This work implements a part of the HPCBIOS project and is a component of the policy:
# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html
#
# Adapted by Kurt Lust (kurt.lust@uantwerpen.be) for the LUMI consortium
#
easyblock = 'CMakeMake'
name = 'GROMACS'
version = '2023-dev'
versionsuffix = '-AMD-GPU'
homepage = 'https://github.com/ROCmSoftwarePlatform/Gromacs'
whatis = [
'ROCm\'s implementation of Gromacs'
]
description = """
GROMACS is a versatile package to perform molecular dynamics, i.e. simulate the
Newtonian equations of motion for systems with hundreds to millions of
particles.
Binaries included:
* gmx: Compiled with HIP support (single precision only)
* gmx_mpi: Compiled with HIP support and MPI (single precision only)
This is single-node threadMPI version with GPU enabled (HIP).
The module sets the environment variables that would otherwise be set by running
the script $EBROOTGROMACS/bin/GMXRC. So running this script snould not be
necessary in most cases.
The module also defines the shell function gromacs-completion that can be used to
turn bash command completion on for GROMACS. Note that unloading the module will
not turn this off, so it may have consequences for things you do later on or
conflict with the command completion of a different version of GROMACS.
"""
toolchain = {'name': 'cpeGNU', 'version': '22.08'}
toolchainopts = {'opt': True, 'usempi': False, 'verbose': False, 'pic': True, 'openmp': True}
sources = [{
'filename': 'gromacs-amd.tar.gz',
'git_config': {
'url': 'https://github.com/ROCmSoftwarePlatform',
'repo_name': 'Gromacs',
'commit': '7bbbb2de208ac1a42c7144ac28ecc5fb0dc0dd4e',
},
}]
builddependencies = [
('buildtools', '%(toolchain_version)s', '', True), # For CMake
('cray-fftw', EXTERNAL_MODULE),
('cray-python', EXTERNAL_MODULE),
('rocm', EXTERNAL_MODULE),
]
dependencies = [
('cray-fftw', EXTERNAL_MODULE),
('cray-python', EXTERNAL_MODULE),
('rocm', EXTERNAL_MODULE),
]
local_configopts = '-D CMAKE_BUILD_TYPE=Release '
local_configopts += '-D CMAKE_C_COMPILER=cc '
local_configopts += '-D CMAKE_CXX_COMPILER=CC '
local_configopts += '-D GMX_OPENMP=ON '
local_configopts += '-D GMX_MPI=ON '
local_configopts += '-D GMX_GPU=HIP '
local_configopts += '-D CMAKE_HIP_ARCHITECTURES="gfx90a" '
local_configopts += '-D AMDGPU_TARGETS="gfx90a" '
local_configopts += '-D GPU_TARGETS="gfx90a" '
local_configopts += '-D HIP_HIPCC_FLAGS="-O3 --amdgpu-target=gfx90a --save-temps -I$CRAY_MPICH_PREFIX/include" '
local_configopts += '-D GMX_GPU_USE_VKFFT=ON '
local_configopts += '-D CMAKE_C_FLAGS="-Ofast" '
local_configopts += '-D CMAKE_CXX_FLAGS="-Ofast" '
local_configopts += '-D GMX_SIMD=AVX2_256 '
local_configopts += '-D CMAKE_EXE_LINKER_FLAGS="-fopenmp" '
local_configopts += '-D GMX_BUILD_FOR_COVERAGE=OFF '
local_configopts += '-D GMX_EXTERNAL_LAPACK=ON '
local_configopts += '-D GMX_EXTERNAL_BLAS=ON '
local_configopts += '-D GMX_BLAS_USER=$CRAY_LIBSCI_PREFIX_DIR/lib/libsci_gnu.so '
local_configopts += '-D GMX_LAPACK_USER=$CRAY_LIBSCI_PREFIX_DIR/lib/libsci_gnu.so '
local_configopts += '-D BUILD_SHARED_LIBS=OFF '
local_configopts += '-D GMX_DOUBLE=OFF '
local_configopts += '-D CMAKE_CXX_LINK_FLAGS=-I$CRAY_MPICH_PREFIX/include '
local_configopts += '-D HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS=-I$CRAY_MPICH_PREFIX/include '
local_configopts += '-D HIP_VERBOSE_BUILD=ON '
local_configopts += '-D CMAKE_VERBOSE_MAKEFILE=ON '
configopts = [
local_configopts + '-DGMX_MPI=OFF',
local_configopts + '-DGMX_MPI=ON',
]
skipsteps = ['test']
# This does what GMXRC.bash does except that it does not enable the command completion.
modextravars = {
'GROMACS_DIR': '%(installdir)s',
'GMXBIN': '%(installdir)s/bin',
'GMXMAN': '%(installdir)s/share/man',
'GMXDATA': '%(installdir)s/share/data',
'GMXTOOLCHAINDIR': '%(installdir)s/share/cmake', # Defined in the standard script but not exported.
}
local_bash_completion = """
[==[
if test -n "${BASH_VERSION+set}" && (complete) > /dev/null 2>&1; then
if (shopt -s extglob) > /dev/null 2>&1; then
shopt -s extglob ;
if [ -f $GMXBIN/gmx-completion.bash ]; then
source $GMXBIN/gmx-completion.bash ;
for cfile in $GMXBIN/gmx-completion-*.bash ; do
source $cfile ;
done ;
fi ;
fi ;
elif test -n "${ZSH_VERSION+set}" > /dev/null 2>&1 ; then
autoload bashcompinit ;
if (bashcompinit) > /dev/null 2>&1; then
bashcompinit ;
if [ -f $GMXBIN/gmx-completion.bash ]; then
source $GMXBIN/gmx-completion.bash ;
for cfile in $GMXBIN/gmx-completion-*.bash ; do
source $cfile ;
done ;
fi ;
fi ;
fi
]==]
"""
local_csh_completion = '"echo \'Not implemented\'"'
modluafooter = """
set_shell_function( 'gromacs-completion', %(bash_completion)s, %(csh_completion)s )
""" % {
'bash_completion': local_bash_completion,
'csh_completion': local_csh_completion,
}
moduleclass = 'bio'