Skip to content

[Amber] [package list]

Amber/22.0-cpeGNU-22.08-AmberTools-22.3-GPU (Amber-22.0-cpeGNU-22.08-AmberTools-22.3-GPU.eb)

This software is archived in the LUMI-EasyBuild-contrib GitHub repository as easybuild/easyconfigs/__archive__/a/Amber/Amber-22.0-cpeGNU-22.08-AmberTools-22.3-GPU.eb. The corresponding module would be Amber/22.0-cpeGNU-22.08-AmberTools-22.3-GPU.

easyblock = 'CMakeMake'

name = 'Amber'

local_amber_ver = 22
local_ambertools_ver = 22
# Patch levels from https://ambermd.org/AmberPatches.php and https://ambermd.org/ATPatches.php
local_patchlevels = (3, 0)  # (AmberTools, Amber)
version = '%s.%s' % (local_amber_ver, local_patchlevels[1])
versionsuffix = '-AmberTools-%s.%s-GPU' % (local_ambertools_ver, local_patchlevels[0])

homepage = 'https://ambermd.org/amber.html'
description = """Amber (originally Assisted Model Building with Energy Refinement) is software for performing
 molecular dynamics and structure prediction."""

toolchain = {'name': 'cpeGNU', 'version': '22.08'}
toolchainopts = {'usempi': True, 'openmp': True}

sources = [
    {'filename': '%%(name)s%s.tar.bz2' % local_amber_ver},
    {'filename': 'AmberTools%s.tar.bz2' % local_ambertools_ver, 'alt_location': 'AmberTools'},
    {'filename': 'amber_amd.23jun22.tar.bz2', 'extract_cmd': "cd amber22_src && tar -xvf %s"},
]

patches = [
     'AmberTools-20_cmake-locate-netcdf.patch',
     'AmberTools-20_fix_missing_MPI_LIBRARY_error.patch',
     'Amber-22_remove_undeclared_redundant_variable.patch',
     'Amber-22_remove_open-pal-link.patch',
     'Amber-22_hipcc_mpich_linking.patch', 
]

builddependencies = [
    ('buildtools',   '%(toolchain_version)s',   '', True),
    ('rocm', '5.3.3', '', SYSTEM),
]

dependencies = [
    ('cray-python', EXTERNAL_MODULE),
    ('cray-fftw', EXTERNAL_MODULE),
    ('cray-hdf5-parallel/1.12.1.5', EXTERNAL_MODULE),
    ('cray-parallel-netcdf', EXTERNAL_MODULE),
    ('cray-netcdf-hdf5parallel', EXTERNAL_MODULE),
    ('Boost', '1.79.0', ''),
    ('arpack-ng', '3.9.0', '-OpenMP'),
]

preconfigopts = 'cd ../amber22_src && ./update_amber --update && cd build && '

local_configopts  = '-D CMAKE_BUILD_TYPE=Release '  
local_configopts += '-D CMAKE_C_COMPILER=cc '
local_configopts += '-D CMAKE_CXX_COMPILER=CC '
local_configopts += '-D CMAKE_Fortran_COMPILER=ftn '
local_configopts += '-D COMPILER=CRAY '
local_configopts += '-D CMAKE_CXX_FLAGS="-O3 -ftree-vectorize -fno-math-errno -fopenmp" '
local_configopts += '-D CMAKE_C_FLAGS="-O3 -ftree-vectorize -fno-math-errno -fopenmp" '
local_configopts += '-D CMAKE_Fortran_FLAGS="-O3 -ftree-vectorize -fno-math-errno -fopenmp"  '
local_configopts += '-D DISABLE_WARNINGS=ON '
local_configopts += '-D CMAKE_VERBOSE_MAKEFILE=ON '
local_configopts += '-D CMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE '
local_configopts += '-D BOOST_ROOT=$EBROOTBOOST '
local_configopts += '-D Boost_NO_SYSTEM_PATHS=ON ' 
local_configopts += '-D MPI=ON '
local_configopts += '-D OPENMP=ON '
local_configopts += '-D USE_FFT=ON '
local_configopts += '-D BUILD_PYTHON=OFF '
local_configopts += '-D CHECK_UPDATES=OFF '
local_configopts += '-D APPLY_UPDATES=FALSE '
local_configopts += '-D DOWNLOAD_MINICONDA=OFF '
local_configopts += '-D HIP=ON '
local_configopts += '-D GPU_TARGETS="gfx90a" '
local_configopts += '-D AMDGPU_TARGETS="gfx90a" '
local_configopts += '-D CUDA_NVCC_FLAGS="--offload-arch=gfx90a;-std=c++14" '
local_configopts += '-D CMAKE_HIP_ARCHITECTURES="gfx90a" '
local_configopts += '-D GTI=TRUE '
local_configopts += '-D VKFFT=ON '
local_configopts += '-D HIP_RDC=ON '
local_configopts += '-D HIP_TOOLKIT_ROOT_DIR=$ROCM_PATH '
local_configopts += '-D HIPCUDA_EMULATE_VERSION="10.1" '
local_configopts += '-D FORCE_EXTERNAL_LIBS="netcdf;fftw;blas;lapack;pnetcdf;arpack" '
local_configopts += '-D TRUST_SYSTEM_LIBS=TRUE '
local_configopts += '-D BLAS_LIBRARIES=$CRAY_LIBSCI_PREFIX_DIR/lib/libsci_gnu_mp.so '
local_configopts += '-D LAPACK_LIBRARIES=$CRAY_LIBSCI_PREFIX_DIR/lib/libsci_gnu_mp.so '
local_configopts += '-D NetCDF_INCLUDES=$CRAY_NETCDF_HDF5PARALLEL_PREFIX/include '
local_configopts += '-D NetCDF_INCLUDES_F90=$CRAY_NETCDF_HDF5PARALLEL_PREFIX/include '
local_configopts += '-D NetCDF_LIBRARIES_F90=$CRAY_NETCDF_HDF5PARALLEL_PREFIX/lib/libnetcdff.so '
local_configopts += '-D NetCDF_LIBRARIES_F77=$CRAY_NETCDF_HDF5PARALLEL_PREFIX/lib/libnetcdff.so ' 
local_configopts += '-D NetCDF_LIBRARIES_C=$CRAY_NETCDF_HDF5PARALLEL_PREFIX/lib/libnetcdf.so '
local_configopts += '-D PnetCDF_LIBRARY=$CRAY_PARALLEL_NETCDF_PREFIX/lib/libpnetcdf.so '
local_configopts += '-D PnetCDF_INCLUDE_DIR=$CRAY_PARALLEL_NETCDF_PREFIX/include '
local_configopts += '-D ARPACK_LIBRARY=$EBROOTARPACKMINNG/lib/libarpack.so '

local_configopts_tools  = '-D BUILD_HOST_TOOLS=ON '
local_configopts_tools += '-D CMAKE_INSTALL_PREFIX=%(installdir)s/tools '
local_configopts_tools += '-B tools '

local_configopts_amber  = '-D BUILD_HOST_TOOLS=OFF '
local_configopts_amber += '-D USE_HOST_TOOLS=ON '
local_configopts_amber += '-D HOST_TOOLS_DIR=%(installdir)s/tools '
local_configopts_amber += '-B amber '

configopts = [ local_configopts + local_configopts_tools, local_configopts + local_configopts_amber ]

prebuildopts = ['cd ../amber22_src/build/tools && ', 'cd ../amber22_src/build/amber && '] 

buildopts = ['', 'xblas_build']

preinstallopts = ['cd ../amber22_src/build/tools && ', 'cd ../amber22_src/build/amber && '] 

installopts = ['-j64', '-j64']

moduleclass = 'chem'

[Amber] [package list]