Skip to content
Snippets Groups Projects
Commit 5facd771 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

Merge branch 'lammps-2022' into '2022'

Lammps 2022

See merge request hps-public/easybuild-repository!1148
parents cac36ae7 ee406710
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,12 @@ Overview of the custom EasyBlocks. ...@@ -73,6 +73,12 @@ Overview of the custom EasyBlocks.
- __*difference compared to upstream*__ upstream doesn't have such a feature - __*difference compared to upstream*__ upstream doesn't have such a feature
- __*can not be removed*__ until merged upstream - __*can not be removed*__ until merged upstream
## LAMMPS
- __*added_by*__ d.alvarez
- __*needed because*__ upstream does not include the changes that we used in the latest stage
- __*difference compared to upstream*__ various, done by Alan
- __*can not be removed*__ until merged upstream or the changes here are deprecated (need to be assesed by an expert)
## NAMD ## NAMD
- __*added_by*__ d.alvarez - __*added_by*__ d.alvarez
- __*needed because*__ need to disable CUDA support even if CUDA comes as a dependency - __*needed because*__ need to disable CUDA support even if CUDA comes as a dependency
......
# -*- coding: utf-8 -*-
##
# Copyright 2009-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://www.herculesstichting.be/in_English)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
@author: Pavel Grochal (INUITS)
@author: Kenneth Hoste (Ghent University)
@author: Alan O'Cais (Juelich Supercomputing Centre)
"""
import os
import tempfile
import easybuild.tools.environment as env
import easybuild.tools.toolchain as toolchain
from easybuild.framework.easyconfig import CUSTOM, MANDATORY
from easybuild.tools.build_log import EasyBuildError, print_warning, print_msg
from easybuild.tools.config import build_option
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import get_shared_lib_ext
from easybuild.easyblocks.generic.cmakemake import CMakeMake
KOKKOS_CPU_ARCH_LIST = [
'AMDAVX', # AMD 64-bit x86 CPU (AVX 1)
'ZEN', # AMD Zen class CPU (AVX 2)
'ZEN2', # AMD Zen2 class CPU (AVX 2)
'ARMV80', # ARMv8.0 Compatible CPU
'ARMV81', # ARMv8.1 Compatible CPU
'ARMV8_THUNDERX', # ARMv8 Cavium ThunderX CPU
'ARMV8_THUNDERX2', # ARMv8 Cavium ThunderX2 CPU
'WSM', # Intel Westmere CPU (SSE 4.2)
'SNB', # Intel Sandy/Ivy Bridge CPU (AVX 1)
'HSW', # Intel Haswell CPU (AVX 2)
'BDW', # Intel Broadwell Xeon E-class CPU (AVX 2 + transactional mem)
'SKX', # Intel Sky Lake Xeon E-class HPC CPU (AVX512 + transactional mem)
'KNC', # Intel Knights Corner Xeon Phi
'KNL', # Intel Knights Landing Xeon Phi
'BGQ', # IBM Blue Gene/Q CPU
'POWER7', # IBM POWER7 CPU
'POWER8', # IBM POWER8 CPU
'POWER9', # IBM POWER9 CPU
'KEPLER30', # NVIDIA Kepler generation CC 3.0 GPU
'KEPLER32', # NVIDIA Kepler generation CC 3.2 GPU
'KEPLER35', # NVIDIA Kepler generation CC 3.5 GPU
'KEPLER37', # NVIDIA Kepler generation CC 3.7 GPU
'MAXWELL50', # NVIDIA Maxwell generation CC 5.0 GPU
'MAXWELL52', # NVIDIA Maxwell generation CC 5.2 GPU
'MAXWELL53', # NVIDIA Maxwell generation CC 5.3 GPU
'PASCAL60', # NVIDIA Pascal generation CC 6.0 GPU
'PASCAL61', # NVIDIA Pascal generation CC 6.1 GPU
'VOLTA70', # NVIDIA Volta generation CC 7.0 GPU
'VOLTA72', # NVIDIA Volta generation CC 7.2 GPU
'TURING75', # NVIDIA Turing generation CC 7.5 GPU
'AMPERE80', # NVIDIA Ampere generation CC 8.0 GPU
'VEGA900', # AMD GPU MI25 GFX900
'VEGA906', # AMD GPU MI50/MI60 GFX906
'INTEL_GEN', #Intel GPUs Gen9+
]
KOKKOS_CPU_MAPPING = {
'sandybridge': 'SNB',
'ivybridge': 'SNB',
'haswell': 'HSW',
'broadwell': 'BDW',
'skylake_avx512': 'SKX',
'cascadelake': 'SKX',
'knights-landing': 'KNL',
'zen': 'ZEN',
'zen2': 'ZEN2', # KOKKOS doesn't seem to distinguish between zen and zen2 (yet?)
}
KOKKOS_GPU_ARCH_TABLE = {
'3.0': 'KEPLER30', # NVIDIA Kepler generation CC 3.0
'3.2': 'KEPLER32', # NVIDIA Kepler generation CC 3.2
'3.5': 'KEPLER35', # NVIDIA Kepler generation CC 3.5
'3.7': 'KEPLER37', # NVIDIA Kepler generation CC 3.7
'5.0': 'MAXWELL50', # NVIDIA Maxwell generation CC 5.0
'5.2': 'MAXWELL52', # NVIDIA Maxwell generation CC 5.2
'5.3': 'MAXWELL53', # NVIDIA Maxwell generation CC 5.3
'6.0': 'PASCAL60', # NVIDIA Pascal generation CC 6.0
'6.1': 'PASCAL61', # NVIDIA Pascal generation CC 6.1
'7.0': 'VOLTA70', # NVIDIA Volta generation CC 7.0
'7.2': 'VOLTA72', # NVIDIA Volta generation CC 7.2
'7.5': 'TURING75', # NVIDIA Turing generation CC 7.5
'8.0': 'AMPERE80', # NVIDIA Ampere generation CC 8.0
}
PKG_PREFIX = 'PKG_'
PKG_USER_PREFIX = PKG_PREFIX + 'USER-'
class EB_LAMMPS(CMakeMake):
"""
Support for building and installing LAMMPS
"""
def __init__(self, *args, **kwargs):
"""LAMMPS easyblock constructor: determine whether we should build with CUDA support enabled."""
super(EB_LAMMPS, self).__init__(*args, **kwargs)
cuda_dep = 'cuda' in [dep['name'].lower() for dep in self.cfg.dependencies()]
cuda_toolchain = hasattr(self.toolchain, 'COMPILER_CUDA_FAMILY')
self.cuda = cuda_dep or cuda_toolchain
@staticmethod
def extra_options(**kwargs):
"""Custom easyconfig parameters for LAMMPS"""
extra_vars = CMakeMake.extra_options()
extra_vars.update({
# see https://developer.nvidia.com/cuda-gpus
'cuda_compute_capabilities': [[], "List of CUDA compute capabilities to build with", CUSTOM],
'general_packages': [None, "List of general packages without '%s' prefix." % PKG_PREFIX, MANDATORY],
'kokkos': [True, "Enable kokkos build.", CUSTOM],
'kokkos_arch': [None, "Set kokkos processor arch manually, if auto-detection doesn't work.", CUSTOM],
'user_packages': [None, "List user packages without '%s' prefix." % PKG_USER_PREFIX, MANDATORY],
})
extra_vars['separate_build_dir'][0] = True
return extra_vars
def prepare_step(self, *args, **kwargs):
"""Custom prepare step for LAMMPS."""
super(EB_LAMMPS, self).prepare_step(*args, **kwargs)
# Unset LIBS when using both KOKKOS and CUDA - it will mix lib paths otherwise
if self.cfg['kokkos'] and self.cuda:
env.unset_env_vars(['LIBS'])
def configure_step(self, **kwargs):
"""Custom configuration procedure for LAMMPS."""
# list of CUDA compute capabilities to use can be specifed in two ways (where (2) overrules (1)):
# (1) in the easyconfig file, via the custom cuda_compute_capabilities;
# (2) in the EasyBuild configuration, via --cuda-compute-capabilities configuration option;
ec_cuda_cc = self.cfg['cuda_compute_capabilities']
cfg_cuda_cc = build_option('cuda_compute_capabilities')
if cfg_cuda_cc and not isinstance(cfg_cuda_cc, list):
raise EasyBuildError("cuda_compute_capabilities in easyconfig should be provided as list of strings, " +
"(for example ['8.0', '7.5']). Got %s" % cfg_cuda_cc)
cuda_cc = check_cuda_compute_capabilities(cfg_cuda_cc, ec_cuda_cc, cuda=self.cuda)
# cmake has its own folder
self.cfg['srcdir'] = os.path.join(self.start_dir, 'cmake')
# Enable following packages, if not configured in easyconfig
default_options = ['BUILD_DOC', 'BUILD_EXE', 'BUILD_LIB', 'BUILD_TOOLS']
for option in default_options:
if "-D%s=" % option not in self.cfg['configopts']:
self.cfg.update('configopts', '-D%s=on' % option)
# enable building of shared libraries, if not specified already via configopts
if self.cfg['build_shared_libs'] is None and '-DBUILD_SHARED_LIBS=' not in self.cfg['configopts']:
self.cfg['build_shared_libs'] = True
# Enable gzip, libpng and libjpeg-turbo support when its included as dependency
deps = [
('gzip', 'GZIP'),
('libpng', 'PNG'),
('libjpeg-turbo', 'JPEG'),
]
for dep_name, with_name in deps:
with_opt = '-DWITH_%s=' % with_name
if with_opt not in self.cfg['configopts']:
if get_software_root(dep_name):
self.cfg.update('configopts', with_opt + 'yes')
else:
self.cfg.update('configopts', with_opt + 'no')
# Disable auto-downloading/building Eigen dependency:
if '-DDOWNLOAD_EIGEN3=' not in self.cfg['configopts']:
self.cfg.update('configopts', '-DDOWNLOAD_EIGEN3=no')
# Compiler complains about 'Eigen3_DIR' not being set, but actually it needs 'EIGEN3_INCLUDE_DIR'.
# see: https://github.com/lammps/lammps/issues/1110
# Enable Eigen when its included as dependency dependency:
eigen_root = get_software_root('Eigen')
if eigen_root:
if '-DEIGEN3_INCLUDE_DIR=' not in self.cfg['configopts']:
self.cfg.update('configopts', '-DEIGEN3_INCLUDE_DIR=%s/include/Eigen' % get_software_root('Eigen'))
if '-DEigen3_DIR=' not in self.cfg['configopts']:
self.cfg.update('configopts', '-DEigen3_DIR=%s/share/eigen3/cmake/' % get_software_root('Eigen'))
# LAMMPS Configuration Options
# https://github.com/lammps/lammps/blob/master/cmake/README.md#lammps-configuration-options
if self.cfg['general_packages']:
for package in self.cfg['general_packages']:
self.cfg.update('configopts', '-D%s%s=on' % (PKG_PREFIX, package))
if self.cfg['user_packages']:
for package in self.cfg['user_packages']:
self.cfg.update('configopts', '-D%s%s=on' % (PKG_USER_PREFIX, package))
# Optimization settings
pkg_opt = '-D%sOPT=' % PKG_PREFIX
if pkg_opt not in self.cfg['configopts']:
self.cfg.update('configopts', pkg_opt + 'on')
# USER-INTEL enables optimizations on Intel processors. GCC has also partial support for some of them.
pkg_user_intel = '-D%sINTEL=' % PKG_USER_PREFIX
if pkg_user_intel not in self.cfg['configopts']:
if self.toolchain.comp_family() in [toolchain.GCC, toolchain.INTELCOMP]:
self.cfg.update('configopts', pkg_user_intel + 'on')
# MPI/OpenMP
if self.toolchain.options.get('usempi', None):
self.cfg.update('configopts', '-DBUILD_MPI=yes')
if self.toolchain.options.get('openmp', None):
self.cfg.update('configopts', '-DBUILD_OMP=yes')
self.cfg.update('configopts', '-D%sOMP=on' % PKG_USER_PREFIX)
# FFTW
if get_software_root("imkl") or get_software_root("FFTW"):
if '-DFFT=' not in self.cfg['configopts']:
if get_software_root("imkl"):
self.log.info("Using the MKL")
self.cfg.update('configopts', '-DFFT=MKL')
else:
self.log.info("Using FFTW")
self.cfg.update('configopts', '-DFFT=FFTW3')
if '-DFFT_PACK=' not in self.cfg['configopts']:
self.cfg.update('configopts', '-DFFT_PACK=array')
# https://lammps.sandia.gov/doc/Build_extras.html
# KOKKOS
if self.cfg['kokkos']:
self.cfg.update('configopts', '-D%sKOKKOS=on' % PKG_PREFIX)
processor_arch, gpu_arch = get_kokkos_arch(cuda_cc, self.cfg['kokkos_arch'], cuda=self.cuda)
if self.toolchain.options.get('openmp', None):
self.cfg.update('configopts', '-DKokkos_ENABLE_OPENMP=yes')
self.cfg.update('configopts', '-DKokkos_ARCH_%s=yes' % processor_arch)
# if KOKKOS and CUDA
if self.cuda:
nvcc_wrapper_path = os.path.join(self.start_dir, "lib", "kokkos", "bin", "nvcc_wrapper")
self.cfg.update('configopts', '-DKokkos_ENABLE_CUDA=yes')
self.cfg.update('configopts', '-DKokkos_ARCH_%s=yes' % gpu_arch)
self.cfg.update('configopts', '-DCMAKE_CXX_COMPILER="%s"' % nvcc_wrapper_path)
self.cfg.update('configopts', '-DCMAKE_CXX_FLAGS="-ccbin $CXX $CXXFLAGS"')
# CUDA only
elif self.cuda:
self.cfg.update('configopts', '-D%sGPU=on' % PKG_PREFIX)
self.cfg.update('configopts', '-DGPU_API=cuda')
self.cfg.update('configopts', '-DGPU_ARCH=%s' % get_cuda_gpu_arch(cuda_cc))
# avoid that pip (ab)uses $HOME/.cache/pip
# cfr. https://pip.pypa.io/en/stable/reference/pip_install/#caching
env.setvar('XDG_CACHE_HOME', tempfile.gettempdir())
self.log.info("Using %s as pip cache directory", os.environ['XDG_CACHE_HOME'])
return super(EB_LAMMPS, self).configure_step()
def sanity_check_step(self, *args, **kwargs):
"""Run custom sanity checks for LAMMPS files, dirs and commands."""
check_files = [
'atm', 'balance', 'colloid', 'crack', 'dipole', 'friction',
'hugoniostat', 'indent', 'melt', 'message', 'min', 'msst',
'nemd', 'obstacle', 'pour', 'voronoi',
]
custom_commands = [
# LAMMPS test - you need to call specific test file on path
"""python -c 'from lammps import lammps; l=lammps(); l.file("%s")'""" %
# The path is joined by "build_dir" (start_dir)/examples/filename/in.filename
os.path.join(self.start_dir, "examples", "%s" % check_file, "in.%s" % check_file)
# And this should be done for every file specified above
for check_file in check_files
]
# Execute sanity check commands within an initialized MPI in MPI enabled toolchains
if self.toolchain.options.get('usempi', None):
custom_commands = [self.toolchain.mpi_cmd_for(cmd, 1) for cmd in custom_commands]
shlib_ext = get_shared_lib_ext()
custom_paths = {
'files': [
os.path.join('bin', 'lmp'),
os.path.join('include', 'lammps', 'library.h'),
os.path.join('lib64', 'liblammps.%s' % shlib_ext),
],
'dirs': [],
}
python = get_software_version('Python')
if python:
pyshortver = '.'.join(get_software_version('Python').split('.')[:2])
pythonpath = os.path.join('lib', 'python%s' % pyshortver, 'site-packages')
custom_paths['dirs'].append(pythonpath)
return super(EB_LAMMPS, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths)
def make_module_extra(self):
"""Add install path to PYTHONPATH"""
txt = super(EB_LAMMPS, self).make_module_extra()
python = get_software_version('Python')
if python:
pyshortver = '.'.join(get_software_version('Python').split('.')[:2])
pythonpath = os.path.join('lib', 'python%s' % pyshortver, 'site-packages')
txt += self.module_generator.prepend_paths('PYTHONPATH', [pythonpath])
txt += self.module_generator.prepend_paths('PYTHONPATH', ["lib64"])
txt += self.module_generator.prepend_paths('LD_LIBRARY_PATH', ["lib64"])
return txt
def get_cuda_gpu_arch(cuda_cc):
"""Return CUDA gpu ARCH in LAMMPS required format. Example: 'sm_32' """
# Get largest cuda supported
return 'sm_%s' % str(sorted(cuda_cc, reverse=True)[0]).replace(".", "")
def get_kokkos_arch(cuda_cc, kokkos_arch, cuda=None):
"""
Return KOKKOS ARCH in LAMMPS required format, which is either 'CPU_ARCH' or 'CPU_ARCH;GPU_ARCH'.
see: https://lammps.sandia.gov/doc/Build_extras.html#kokkos
"""
if cuda is None or not isinstance(cuda, bool):
cuda = get_software_root('CUDA')
processor_arch = None
if kokkos_arch:
if kokkos_arch not in KOKKOS_CPU_ARCH_LIST:
warning_msg = "Specified CPU ARCH (%s) " % kokkos_arch
warning_msg += "was not found in listed options [%s]." % KOKKOS_CPU_ARCH_LIST
warning_msg += "Still might work though."
print_warning(warning_msg)
processor_arch = kokkos_arch
else:
warning_msg = "kokkos_arch not set. Trying to auto-detect CPU arch."
print_warning(warning_msg)
processor_arch = KOKKOS_CPU_MAPPING.get(get_cpu_arch())
if not processor_arch:
error_msg = "Couldn't determine CPU architecture, you need to set 'kokkos_arch' manually."
raise EasyBuildError(error_msg)
print_msg("Determined cpu arch: %s" % processor_arch)
gpu_arch = None
if cuda:
# CUDA below
for cc in sorted(cuda_cc, reverse=True):
gpu_arch = KOKKOS_GPU_ARCH_TABLE.get(str(cc))
if gpu_arch:
break
else:
warning_msg = "(%s) GPU ARCH was not found in listed options." % cc
print_warning(warning_msg)
if not gpu_arch:
error_msg = "Specified GPU ARCH (%s) " % cuda_cc
error_msg += "was not found in listed options [%s]." % KOKKOS_GPU_ARCH_TABLE
raise EasyBuildError(error_msg)
return processor_arch, gpu_arch
def check_cuda_compute_capabilities(cfg_cuda_cc, ec_cuda_cc, cuda=None):
"""
Checks if cuda-compute-capabilities is set and prints warning if it gets declared on multiple places.
:param cfg_cuda_cc: cuda-compute-capabilities from cli config
:param ec_cuda_cc: cuda-compute-capabilities from easyconfig
:param cuda: boolean to check if cuda should be enabled or not
:return: returns preferred cuda-compute-capabilities
"""
if cuda is None or not isinstance(cuda, bool):
cuda = get_software_root('CUDA')
cuda_cc = cfg_cuda_cc or ec_cuda_cc or []
if cuda:
if cfg_cuda_cc and ec_cuda_cc:
warning_msg = "cuda_compute_capabilities specified in easyconfig (%s)" % ec_cuda_cc
warning_msg += " are overruled by "
warning_msg += "--cuda-compute-capabilities configuration option (%s)" % cfg_cuda_cc
print_warning(warning_msg)
elif not cuda_cc:
error_msg = "No CUDA compute capabilities specified.\nTo build LAMMPS with Cuda you need to use"
error_msg += "the --cuda-compute-capabilities configuration option or the cuda_compute_capabilities "
error_msg += "easyconfig parameter to specify a list of CUDA compute capabilities to compile with."
raise EasyBuildError(error_msg)
elif cuda_cc:
warning_msg = "Missing CUDA package (in dependencies), "
warning_msg += "but 'cuda_compute_capabilities' option was specified."
print_warning(warning_msg)
return cuda_cc
def get_cpu_arch():
"""
Checks for CPU architecture via archspec library.
https://github.com/archspec/archspec
Archspec should be bundled as build-dependency to determine CPU arch.
It can't be called directly in code because it gets available only after prepare_step.
:return: returns detected cpu architecture
"""
out, ec = run_cmd("python -c 'from archspec.cpu import host; print(host())'", simple=False)
if ec:
raise EasyBuildError("Failed to determine CPU architecture: %s", out)
return out.strip()
# Installation command used:
# eb --include-easyblocks=$PWD/Custom_EasyBlocks/lammps.py,"$EASYBUILD_INCLUDE_EASYBLOCKS"\\
# --mpi-cmd-template='echo %(nr_ranks)s && %(cmd)s' \\
# Golden_Repo/l/LAMMPS/LAMMPS-22Oct2020-intel-para-2020-Python-3.9.6.eb
name = 'LAMMPS'
version = '7Jan2022'
homepage = 'https://lammps.sandia.gov/'
description = """LAMMPS is a classical molecular dynamics code, and an acronym
for Large-scale Atomic/Molecular Massively Parallel Simulator. LAMMPS has
potentials for solid-state materials (metals, semiconductors) and soft matter
(biomolecules, polymers) and coarse-grained or mesoscopic systems. It can be
used to model atoms or, more generically, as a parallel particle simulator at
the atomic, meso, or continuum scale. LAMMPS runs on single processors or in
parallel using message-passing techniques and a spatial-decomposition of the
simulation domain. The code is designed to be easy to modify or extend with new
functionality.
"""
toolchain = {'name': 'gpsmkl', 'version': '2021b'}
toolchainopts = {'openmp': True, 'cstd': 'c++14', 'usempi': True}
# 'https://github.com/lammps/lammps/archive/'
source_urls = [GITHUB_LOWER_SOURCE]
sources = [
'patch_%(version)s.tar.gz',
# Since we are dropping yaff for the time being, drop this too
# {'extract_cmd': 'cp %s %(builddir)s', 'filename': 'lammps_vs_yaff_test_single_point_energy.py'},
]
checksums = ['fbf6c6814968ae0d772d7b6783079ff4f249a8faeceb39992c344969e9f1edbb']
builddependencies = [
('CMake', '3.21.1', '', SYSTEM),
('pkg-config', '0.29.2'),
('archspec', '0.1.3'),
]
dependencies = [
('CUDA', '11.5', '', SYSTEM),
('Python', '3.9.6'),
('libpng', '1.6.37'),
('libjpeg-turbo', '2.1.1'),
('netCDF', '4.8.1'),
('GSL', '2.7'),
('zlib', '1.2.11'),
('gzip', '1.10'),
('cURL', '7.78.0'),
('HDF5', '1.12.1'),
('tbb', '2020.3'),
('PCRE', '8.45'),
('libxml2', '2.9.10'),
('FFmpeg', '4.4.1'),
('Voro++', '0.4.6'),
('kim-api', '2.2.1'),
('Eigen', '3.3.9'),
# 'YAFF', # yaff needs an old version of h5py, which needs an old version of HDF5. Let's drop it
# ('yaff', '1.6.0'),
('PLUMED', '2.7.2'),
('ScaFaCoS', '1.0.1'),
# See below for why this is not included
# ('VTK', '8.2.0', local_python_versionsuffix),
]
# not enabled (yet), needs more work/additional dependencies:
# ADIOS - https://lammps.sandia.gov/doc/Build_extras.html#user-adios-package
# AWPMD - https://lammps.sandia.gov/doc/Build_extras.html#user-awpmd-package
# QMMM - https://lammps.sandia.gov/doc/Packages_details.html#pkg-user-qmmm
# QUIP - https://lammps.sandia.gov/doc/Build_extras.html#user-quip-package
# VTK - support is available in the foss version but currently fails to build for intel
# due to https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/746611
# see https://github.com/lammps/lammps/issues/1964 for details
user_packages = [
'ATC',
'BOCS',
'CGDNA',
'CGSDK',
'COLVARS',
'DIFFRACTION',
'DPD',
'DRUDE',
'EFF',
'FEP',
'H5MD',
'LB',
'MANIFOLD',
'MEAMC',
'MESODPD',
'MESONT',
'MGPT',
'MISC',
'MOFFF',
'MOLFILE',
'NETCDF',
'PHONON',
'PLUMED',
'PTM',
'QTB',
'REACTION',
'REAXC',
'SCAFACOS',
'SDPD',
'SMD',
'SMTBQ',
'SPH',
'TALLY',
'UEF',
# 'YAFF', # yaff needs an old version of h5py, which needs an old version of HDF5. Let's drop it
]
enhance_sanity_check = True
# To use additional custom configuration options, use the 'configopts' easyconfig parameter
# See docs and lammps easyblock for more information.
# https://github.com/lammps/lammps/blob/master/cmake/README.md#lammps-configuration-options
# Use the bfd linker for C++ (this will only be picked up when using Kokkos)
preconfigopts = 'export CXXFLAGS="-fuse-ld=bfd $CXXFLAGS" &&'
# docs require virtualenv (which we don't have)
configopts = ' -DBUILD_DOC=off -DPKG_USER-INTEL=off '
# auto-enabled by easyblock
# 'GPU' - if cuda package is present and kokkos is disabled
# 'KOKKOS' - if kokkos is enabled (by default)
#
# not enabled (yet), needs more work/additional dependencies:
# 'LATTE', - https://lammps.sandia.gov/doc/Build_extras.html#latte-package
# 'MSCG', - https://lammps.sandia.gov/doc/Build_extras.html#mscg-package
general_packages = [
'ASPHERE',
'BODY',
'CLASS2',
'COLLOID',
'COMPRESS',
'CORESHELL',
'DIPOLE',
'GRANULAR',
'KIM',
'KSPACE',
'MANYBODY',
'MC',
'MESSAGE',
'MISC',
'MLIAP',
'MOLECULE',
'MPIIO',
'PERI',
'POEMS',
'PYTHON',
'QEQ',
'REPLICA',
'RIGID',
'SHOCK',
'SNAP',
'SPIN',
'SRD',
'VORONOI',
]
# run short test case to make sure installation doesn't produce blatently incorrect results;
# this catches a problem where having the USER-INTEL package enabled causes trouble when installing with intel/2019b
# (requires an MPI context for intel/2020a)
# Since we are dropping yaff for the time being, drop this too
# sanity_check_commands = ['cd %(builddir)s && %(mpi_cmd_prefix)s python lammps_vs_yaff_test_single_point_energy.py']
moduleclass = 'chem'
easyblock = 'ConfigureMake'
name = 'ScaFaCoS'
version = '1.0.1'
homepage = 'http://www.scafacos.de/'
description = "ScaFaCoS is a library of scalable fast coulomb solvers."
toolchain = {'name': 'gpsmpi', 'version': '2021b'}
toolchainopts = {'usempi': True}
source_urls = ['https://github.com/%(namelower)s/%(namelower)s/releases/download/v%(version)s']
sources = [SOURCELOWER_TAR_GZ]
checksums = [
'2b125f313795c81b0e87eb920082e91addf94c17444f9486d979e691aaded99b', # scafacos-1.0.1.tar.gz
]
builddependencies = [
('Autotools', '20210726'),
('pkg-config', '0.29.2'),
]
dependencies = [
('GMP', '6.2.1'),
('GSL', '2.7'),
('FFTW', '3.3.10'),
]
preconfigopts = 'unset F77 && '
configopts = 'FCFLAGS="-fallow-argument-mismatch $FCFLAGS" '
configopts += '--enable-shared --enable-static --disable-doc '
# tell it where to find provided FFTW
configopts += '--without-internal-fftw --with-fftw3-includedir=$EBROOTFFTW/include --with-fftw3-libdir=$EBROOTFFTW/lib '
# only include the solvers supported for LAMMPS
# (for p2nfft we need an additonal dependency)
configopts += '--enable-fcs-solvers=direct,ewald,fmm,p3m '
sanity_check_paths = {
'files': ['lib/libfcs.a', 'include/fcs.h', 'include/fcs_module.mod'],
'dirs': [],
}
moduleclass = 'math'
...@@ -14,6 +14,7 @@ releases = { ...@@ -14,6 +14,7 @@ releases = {
'AT-SPI2-ATK': ['2.34.2', '2.38.0'], 'AT-SPI2-ATK': ['2.34.2', '2.38.0'],
'AT-SPI2-core': ['2.36.0', '2.40.3'], 'AT-SPI2-core': ['2.36.0', '2.40.3'],
'Autotools': ['20200321', '20210726'], 'Autotools': ['20200321', '20210726'],
'archspec': ['0.1.0', '0.1.3'],
'binutils': ['2.36.1', '2.37'], 'binutils': ['2.36.1', '2.37'],
'Bison': ['3.7.6', '3.7.6'], 'Bison': ['3.7.6', '3.7.6'],
'Boost': ['1.74.0', '1.78.0'], 'Boost': ['1.74.0', '1.78.0'],
...@@ -58,13 +59,17 @@ releases = { ...@@ -58,13 +59,17 @@ releases = {
'HarfBuzz': ['2.6.7', '2.8.2'], 'HarfBuzz': ['2.6.7', '2.8.2'],
'HDF5': ['1.10.6', '1.12.1'], 'HDF5': ['1.10.6', '1.12.1'],
'HTSLib': ['1.1.4', '1.1.4'], 'HTSLib': ['1.1.4', '1.1.4'],
'h5py': ['2.10.0', '3.5.0'],
'ICU': ['67.1', '70.1'], 'ICU': ['67.1', '70.1'],
'ImageMagick': ['7.0.10-25', '7.1.0.13'], 'ImageMagick': ['7.0.10-25', '7.1.0.13'],
'imkl': ['2021.2.0', '2021.4.0'], 'imkl': ['2021.2.0', '2021.4.0'],
'intel-para': ['2021', '2021b'],
'ipsmpi': ['2021', '2021b'],
'intltool': ['0.51.0', '0.51.0'], 'intltool': ['0.51.0', '0.51.0'],
'ispc': ['1.12.0', '1.16.1'], 'ispc': ['1.12.0', '1.16.1'],
'JasPer': ['2.0.19', '2.0.33'], 'JasPer': ['2.0.19', '2.0.33'],
'Java': ['15', '15'], 'Java': ['15', '15'],
'kim-api': ['2.1.3', '2.2.1'],
'libcroco': ['0.6.13', '0.6.13'], 'libcroco': ['0.6.13', '0.6.13'],
'libdrm': ['2.4.106', '2.4.107'], 'libdrm': ['2.4.106', '2.4.107'],
'libepoxy': ['1.5.4', '1.5.9'], 'libepoxy': ['1.5.4', '1.5.9'],
...@@ -85,6 +90,7 @@ releases = { ...@@ -85,6 +90,7 @@ releases = {
'NASM': ['2.15.03', '2.15.05'], 'NASM': ['2.15.03', '2.15.05'],
'Ninja': ['1.10.0', '1.10.2'], 'Ninja': ['1.10.0', '1.10.2'],
'NSS': ['3.51', '3.69'], 'NSS': ['3.51', '3.69'],
'netCDF': ['4.7.4', '4.8.1'],
'numactl': ['2.0.13', '2.0.14'], 'numactl': ['2.0.13', '2.0.14'],
'OpenEXR': ['2.5.2', '3.1.1'], 'OpenEXR': ['2.5.2', '3.1.1'],
'OpenGL': ['2020', '2021b'], 'OpenGL': ['2020', '2021b'],
...@@ -96,6 +102,7 @@ releases = { ...@@ -96,6 +102,7 @@ releases = {
'pkg-config': ['0.29.2', '0.29.2'], 'pkg-config': ['0.29.2', '0.29.2'],
'pkgconfig': ['1.5.4', '1.5.5'], 'pkgconfig': ['1.5.4', '1.5.5'],
'PROJ': ['7.1.0', '8.1.0'], 'PROJ': ['7.1.0', '8.1.0'],
'PLUMED': ['2.6.1', '2.7.2'],
'protobuf': ['3.14.0', '3.17.3'], 'protobuf': ['3.14.0', '3.17.3'],
'psmpi': ['5.4.9-1', '5.5.0-1'], 'psmpi': ['5.4.9-1', '5.5.0-1'],
'pybind11': ['2.5.0', '2.7.1'], 'pybind11': ['2.5.0', '2.7.1'],
...@@ -156,6 +163,12 @@ def updateFileName(fileName, current, latest): ...@@ -156,6 +163,12 @@ def updateFileName(fileName, current, latest):
elif 'gpsmkl' in fileName: elif 'gpsmkl' in fileName:
fileName = fileName.replace( fileName = fileName.replace(
releases['gpsmkl'][0], releases['gpsmkl'][1], 1) releases['gpsmkl'][0], releases['gpsmkl'][1], 1)
elif 'ipsmpi' in fileName:
fileName = fileName.replace(
releases['ipsmpi'][0], releases['ipsmpi'][1], 1)
elif 'intel-para' in fileName:
fileName = fileName.replace(
releases['intel-para'][0], releases['intel-para'][1], 1)
fileName = fileName.replace( fileName = fileName.replace(
'-Python-3.8.5', '', 1) '-Python-3.8.5', '', 1)
return fileName return fileName
...@@ -182,6 +195,10 @@ def updateFile(oldName, newName, current, latest): ...@@ -182,6 +195,10 @@ def updateFile(oldName, newName, current, latest):
releases['gomkl'][0], releases['gomkl'][1], 1) releases['gomkl'][0], releases['gomkl'][1], 1)
line = line.replace( line = line.replace(
releases['gpsmpi'][0], releases['gpsmpi'][1], 1) releases['gpsmpi'][0], releases['gpsmpi'][1], 1)
line = line.replace(
releases['ipsmpi'][0], releases['ipsmpi'][1], 1)
line = line.replace(
releases['intel-para'][0], releases['intel-para'][1], 1)
line = line.replace( line = line.replace(
releases['gcccoremkl'][0], releases['gcccoremkl'][1], 1) releases['gcccoremkl'][0], releases['gcccoremkl'][1], 1)
if line.startswith('site_contacts'): if line.startswith('site_contacts'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment