Skip to content

Commit

Permalink
adding easyconfigs: DFTB+-24.1-foss-2023a.eb, libmbd-0.12.6-foss-2023…
Browse files Browse the repository at this point in the history
…a.eb, ELSI-2.11.0-foss-2023a-PEXSI.eb, NTPoly-3.1.0-foss-2023a.eb and patches: ELSI-2.11.0_bison_3.8_compat.patch
  • Loading branch information
WilleBell committed Sep 13, 2024
1 parent 8856246 commit 166d673
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 0 deletions.
93 changes: 93 additions & 0 deletions easybuild/easyconfigs/d/DFTB+/DFTB+-24.1-foss-2023a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
easyblock = 'CMakeMake'

name = 'DFTB+'
version = '24.1'

homepage = 'https://www.dftb-plus.info'
description = """DFTB+ is a fast and efficient versatile quantum mechanical simulation package.
It is based on the Density Functional Tight Binding (DFTB) method, containing
almost all of the useful extensions which have been developed for the DFTB
framework so far. Using DFTB+ you can carry out quantum mechanical simulations
like with ab-initio density functional theory based packages, but in an
approximate way gaining typically around two order of magnitude in speed."""

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'usempi': True, 'openmp': True, 'pic': True}

_external_dir = '%%(builddir)s/dftbplus-%%(version)s/external/%s/origin/'
_external_extract = 'mkdir -p %s && tar -C %s' % (_external_dir, _external_dir)
_external_extract += ' --strip-components=1 -xzf %%s'

source_urls = ['https://github.com/dftbplus/dftbplus/releases/download/%(version)s']
sources = [
'dftbplus-%(version)s.tar.xz',
{
# Slater-Koster (slakos) data for testing
'source_urls': ['https://github.com/dftbplus/testparams/archive'],
'download_filename': 'fbe3d62127d86bd8e49ad25a1e5793e6a095e8e7.tar.gz',
'filename': 'slakos-data-%(version)s.tar.gz',
'extract_cmd': _external_extract % ('slakos', 'slakos'),
},
{
# GBSA (gbsa) data for testing
'source_urls': ['https://github.com/grimme-lab/gbsa-parameters/archive'],
'download_filename': '6836c4d997e4135e418cfbe273c96b1a3adb13e2.tar.gz',
'filename': 'gbsa-data-%(version)s.tar.gz',
'extract_cmd': _external_extract % ('gbsa', 'gbsa'),
},
]
checksums = [
{'dftbplus-24.1.tar.xz': '3bc405d1ab834b6b145ca671fb44565ec50a6f576e9e18e7a1ae2c613a311321'},
{'slakos-data-24.1.tar.gz': '78a0494c2ff9216d6a9199ba07d632b18b809e0198f43905c044b5748bde488d'},
{'gbsa-data-24.1.tar.gz': 'd464f9f7b1883d1353b433d0c7eae2f5606af092d9b51d38e9ed15e072610a79'},
]

builddependencies = [
('CMake', '3.26.3'),
('pkgconf', '1.9.5'),
('git', '2.41.0', '-nodocs'),
]

dependencies = [
('Python', '3.11.3'),
('SciPy-bundle', '2023.07'),
('DFTD4', '3.7.0'),
('ELSI', '2.11.0', '-PEXSI'),
('libmbd', '0.12.6'),
]

# Prefer dependencies from EB than bundled sources
configopts = '-DHYBRID_CONFIG_METHODS="Find;Submodule;Fetch" '
configopts += '-DWITH_MPI=1 -DWITH_OMP=1 -DWITH_SDFTD3=1 -DWITH_ELSI=1 -DWITH_MBD=1 -DWITH_UNIT_TESTS=1 '
configopts += '-DBUILD_SHARED_LIBS=1 -DWITH_API=1 -DWITH_PYTHON=0 ' # Python bindings installed as extension
configopts += '-DSCALAPACK_LIBRARY="$LIBSCALAPACK" '

runtest = 'test'

exts_defaultclass = 'PythonPackage'
exts_default_options = {
'download_dep_fail': True,
'use_pip': True,
'runtest': False,
}
exts_list = [
('dptools', version, {
'source_tmpl': 'dftbplus-%(version)s.tar.xz',
'source_urls': ['https://github.com/dftbplus/dftbplus/releases/download/%(version)s'],
'start_dir': 'tools/dptools',
'checksums': ['3bc405d1ab834b6b145ca671fb44565ec50a6f576e9e18e7a1ae2c613a311321'],
}),
]

sanity_check_paths = {
'files': ['bin/' + x for x in ['dftb+', 'dp_bands', 'dp_dos', 'gen2cif', 'gen2xyz', 'makecube',
'modes', 'repeatgen', 'straingen', 'waveplot', 'xyz2gen']] +
['lib/libdftbplus.%s' % SHLIB_EXT, 'lib/libmpifx.%s' % SHLIB_EXT],
'dirs': ['include/dftbplus', 'lib/cmake', 'lib/pkgconfig', 'lib/python%(pyshortver)s/site-packages']
}

sanity_check_commands = ["python -c 'import dptools'"]

modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'}

moduleclass = 'phys'
43 changes: 43 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.11.0-foss-2023a-PEXSI.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name = 'ELSI'
version = '2.11.0'
versionsuffix = '-PEXSI'

homepage = 'https://wordpress.elsi-interchange.org/'
description = """ELSI provides and enhances scalable, open-source software library solutions for
electronic structure calculations in materials science, condensed matter physics, chemistry, and many other fields.
ELSI focuses on methods that solve or circumvent eigenvalue problems in electronic structure theory.
The ELSI infrastructure should also be useful for other challenging eigenvalue problems.
"""

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'usempi': True, 'pic': True, 'cstd': 'c++11', 'extra_fflags': '-fallow-argument-mismatch'}

source_urls = ['https://gitlab.com/elsi_project/elsi_interface/-/archive/v2.11.0/']
sources = ['elsi_interface-v%(version)s.tar.gz']
patches = [
'ELSI-2.11.0_bison_3.8_compat.patch',
]
checksums = [
{'elsi_interface-v2.11.0.tar.gz': '2e6929827ed9c99a32381ed9da40482e862c28608d59d4f27db7dcbcaed1520d'},
{'ELSI-2.11.0_bison_3.8_compat.patch': 'a1284f5c0f442129610aa0fb463cc2b54450e3511a2fd6c871fadc21a16e9504'},
]

builddependencies = [
('flex', '2.6.4'),
('Bison', '3.8.2'),
('CMake', '3.26.3'),
]

dependencies = [
('ELPA', '2023.05.001'),
('NTPoly', '3.1.0'),
]

abs_path_compilers = True
build_internal_pexsi = True

configopts = '-DENABLE_BSEPACK=ON '

runtest = True

moduleclass = 'math'
14 changes: 14 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.11.0_bison_3.8_compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Make it compatible with Bison 3.7
Author: Åke Sandgren, 20211020
Update: Cintia Willemyns (Vrije Universiteit Brussel)
--- elsi_interface-v2.11.0.orig/external/SCOTCH/CMakeLists.txt 2024-09-10 19:01:11.447551000 +0200
+++ elsi_interface-v2.11.0/external/SCOTCH/CMakeLists.txt 2024-09-10 19:08:44.913993743 +0200
@@ -56,7 +56,7 @@
COMMAND mv ${PROJECT_BINARY_DIR}/generated/tmp2.c ${PROJECT_BINARY_DIR}/generated/parser_yy.c
# Versions of bison > 2.X insert a '#include tmp2.h' in tmp2.c. A simple 'mv' will not work.
# The file needs to remain in the directory with the old name. Hence the 'cp'
- COMMAND cp ${PROJECT_BINARY_DIR}/generated/tmp2.h ${PROJECT_BINARY_DIR}/generated/parser_ly.h
+ COMMAND ln -s ${PROJECT_BINARY_DIR}/generated/tmp2.h ${PROJECT_BINARY_DIR}/generated/parser_ly.h
COMMAND flex -Pscotchyy -o${PROJECT_BINARY_DIR}/generated/tmp1.c ${SCOTCH_DIR}/parser_ll.l
COMMAND mv ${PROJECT_BINARY_DIR}/generated/tmp1.c ${PROJECT_BINARY_DIR}/generated/parser_ll.c
DEPENDS ${SCOTCH_DIR}/parser_yy.y ${SCOTCH_DIR}/parser_ll.l ${SCOTCH_DIR}/parser_yy.h ${SCOTCH_DIR}/parser_ll.h
59 changes: 59 additions & 0 deletions easybuild/easyconfigs/l/libmbd/libmbd-0.12.6-foss-2023a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
easyblock = 'CMakeMake'

name = 'libmbd'
version = '0.12.6'

homepage = 'https://libmbd.github.io/index.html'
description = """
Libmbd implements the many-body dispersion (MBD) method in several programming languages and frameworks:
- The Fortran implementation is the reference, most advanced implementation, with support for analytical
gradients and distributed parallelism, and additional functionality beyond the MBD method itself.
It provides a low-level and a high-level Fortran API, as well as a C API. Furthermore, Python bindings
to the C API are provided.
- The Python/Numpy implementation is intended for prototyping, and as a high-level language reference.
- The Python/Tensorflow implementation is an experiment that should enable rapid prototyping of machine
learning applications with MBD.
The Python-based implementations as well as Python bindings to the Libmbd C API are accessible from the
Python package called Pymbd.
"""

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'usempi': True, 'pic': True}

github_account = 'libmbd'
source_urls = [GITHUB_SOURCE]
sources = ['%(version)s.tar.gz']
checksums = ['9f8154b6b2f57e78a8e33d3b315a244185e8e5ecb03661a469808af7512e761e']

builddependencies = [
('CMake', '3.26.3'),
('pkgconf', '1.9.5'),
]

dependencies = [
('Python', '3.11.3'),
('SciPy-bundle', '2023.07'),
('ELSI', '2.11.0', '-PEXSI'),
]

# build scripts expect either a git repo or a defined version string in a file
_versiontag_file = '%(builddir)s/%(name)s-%(version)s/cmake/LibmbdVersionTag.cmake'
preconfigopts = "echo 'set(VERSION_TAG \"%%(version)s\")' > %s && " % _versiontag_file

configopts = "-DENABLE_SCALAPACK_MPI=ON -DENABLE_ELSI=ON "
configopts += "-DMPIEXEC_MAX_NUMPROCS=1 " # number of procs in the tests

# make sure that built libraries (libmbd.so) in build directory are picked when running tests
# this is required when RPATH linking is used
pretestopts = "export LD_LIBRARY_PATH=%(builddir)s/easybuild_obj:$LD_LIBRARY_PATH && "

runtest = 'test'

sanity_check_paths = {
'files': ['lib/libmbd.%s' % SHLIB_EXT, 'include/mbd/mbd.h', 'include/mbd/mbd.mod'],
'dirs': ['lib/cmake/mbd'],
}

moduleclass = 'phys'
28 changes: 28 additions & 0 deletions easybuild/easyconfigs/n/NTPoly/NTPoly-3.1.0-foss-2023a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
easyblock = 'CMakeMake'

name = 'NTPoly'
version = '3.1.0'

homepage = 'https://github.com/william-dawson/NTPoly'
description = """is a massively parallel library for computing the functions of sparse, symmetric matrices based on
polynomial expansions. For sufficiently sparse matrices, most of the matrix functions
in NTPoly can be computed in linear time."""

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'openmp': False, 'usempi': True}

source_urls = ['https://github.com/william-dawson/NTPoly/archive/ntpoly-v%(version)s']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['71cd6827f20c68e384555dbcfc85422d0690e21d21d7b5d4f7375544a2755271']

builddependencies = [('CMake', '3.26.3')]

build_shared_libs = True

sanity_check_paths = {
'files': ['include/%s.mod' % x for x in ['datatypesmodule', 'densitymatrixsolversmodule']] +
['lib64/libNTPoly.%s' % SHLIB_EXT, 'lib/libNTPoly.%s' % SHLIB_EXT],
'dirs': []
}

moduleclass = 'math'

0 comments on commit 166d673

Please sign in to comment.