From 1d3666d3678be3c312256408d603d924243e000d Mon Sep 17 00:00:00 2001 From: maxim-masterov Date: Thu, 7 Aug 2025 15:37:01 +0200 Subject: [PATCH 1/3] Add CP2K and dependencies --- .../c/CP2K/CP2K-2025.2-foss-2025a.eb | 45 +++++++++++++++++ .../Libint-2.11.1-GCC-14.2.0-lmax-6-cp2k.eb | 47 ++++++++++++++++++ .../libvori/libvori-220621-GCCcore-14.2.0.eb | 27 +++++++++++ .../l/libxc/libxc-7.0.0-GCC-14.2.0.eb | 48 +++++++++++++++++++ .../l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb | 27 +++++++++++ 5 files changed, 194 insertions(+) create mode 100644 easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb create mode 100644 easybuild/easyconfigs/l/Libint/Libint-2.11.1-GCC-14.2.0-lmax-6-cp2k.eb create mode 100644 easybuild/easyconfigs/l/libvori/libvori-220621-GCCcore-14.2.0.eb create mode 100644 easybuild/easyconfigs/l/libxc/libxc-7.0.0-GCC-14.2.0.eb create mode 100644 easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb b/easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb new file mode 100644 index 000000000000..b8eb323dd15b --- /dev/null +++ b/easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb @@ -0,0 +1,45 @@ +## +# Author: Robert Mijakovic +## +name = 'CP2K' +version = '2025.2' + +homepage = 'https://www.cp2k.org/' +description = """CP2K is a freely available (GPL) program, written in Fortran 95, to perform atomistic and molecular + simulations of solid state, liquid, molecular and biological systems. It provides a general framework for different + methods such as e.g. density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW), and + classical pair and many-body potentials. """ + +toolchain = {'name': 'foss', 'version': '2025a'} +toolchainopts = {'pic': True, 'openmp': True} + +source_urls = ['https://github.com/cp2k/cp2k/releases/download/v%(version)s/'] +sources = [SOURCELOWER_TAR_BZ2] +checksums = ['c8392a4e123304644ec8d241443796277c6ed7ae977452317e779f3c387c2e19'] + +builddependencies = [ + ('flex', '2.6.4'), + ('Bison', '3.8.2'), +] + +dependencies = [ + ('Libint', '2.11.1', '-lmax-6-cp2k'), + ('libxc', '7.0.0'), + ('libvori', '220621'), + ('FFTW', '3.3.10'), + ('PLUMED', '2.9.4'), +] +if ARCH == 'x86_64': + # LIBXSMM is not supported supported on ARM with GCC 12.2.0 and 12.3.0 + # see https://www.cp2k.org/dev:compiler_support + dependencies += [ + ('libxsmm', '1.17'), + ] + +type = 'psmp' + +# regression test reports handful of failures, +# we're assuming those are OK to ignore... +ignore_regtest_fails = True + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.11.1-GCC-14.2.0-lmax-6-cp2k.eb b/easybuild/easyconfigs/l/Libint/Libint-2.11.1-GCC-14.2.0-lmax-6-cp2k.eb new file mode 100644 index 000000000000..787031595304 --- /dev/null +++ b/easybuild/easyconfigs/l/Libint/Libint-2.11.1-GCC-14.2.0-lmax-6-cp2k.eb @@ -0,0 +1,47 @@ +## +# This easyconfig is based on the easy config written originally by Robert Mijakovic +# Author: Ben Czaja (SURF) +# maxim-masterov (SURF) +## +name = 'Libint' +version = '2.11.1' +local_lmax = 6 +# custom configuration, to be used as dependency for CP2K +versionsuffix = '-lmax-%s-cp2k' % local_lmax + +homepage = 'https://github.com/evaleev/libint' +description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body + matrix elements (integrals) over Cartesian Gaussian functions used in modern atomic and molecular theory.""" + +toolchain = {'name': 'GCC', 'version': '14.2.0'} +toolchainopts = {'pic': True, 'cstd': 'c++11'} + +source_urls = ['https://github.com/evaleev/libint/archive'] +sources = ['v%(version)s.tar.gz'] +checksums = [ + {'v2.11.1.tar.gz': '58ab0f893d94cbed3ab35a6c26ec5e4d8541c59889407a6d30c50b8ea415bdf3'}, +] + +builddependencies = [ + ('Autotools', '20240712'), + ('GMP', '6.3.0'), + ('Boost', '1.88.0'), + ('Eigen', '3.4.0'), + ('Python', '3.13.1'), + ('CMake', '3.31.3'), +] + +# configure options as required by CP2K, +# see Jenkinsfile in https://github.com/cp2k/libint-cp2k +local_eri_max_am = '%s,%s' % (local_lmax, local_lmax - 1) +local_eri23_max_am = '%s,%s' % (local_lmax + 2, local_lmax + 1) + +libint_compiler_configopts = '--enable-eri=1 --enable-eri2=1 --enable-eri3=1 --with-max-am=%s ' % local_lmax +libint_compiler_configopts += '--with-eri-max-am=%s ' % local_eri_max_am +libint_compiler_configopts += '--with-eri2-max-am=%s ' % local_eri23_max_am +libint_compiler_configopts += '--with-eri3-max-am=%s ' % local_eri23_max_am +libint_compiler_configopts += '--enable-generic-code --disable-unrolling' + +with_fortran = True + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/l/libvori/libvori-220621-GCCcore-14.2.0.eb b/easybuild/easyconfigs/l/libvori/libvori-220621-GCCcore-14.2.0.eb new file mode 100644 index 000000000000..4b01142051ce --- /dev/null +++ b/easybuild/easyconfigs/l/libvori/libvori-220621-GCCcore-14.2.0.eb @@ -0,0 +1,27 @@ +easyblock = 'CMakeMake' + +name = 'libvori' +version = '220621' + +homepage = 'https://brehm-research.de/libvori.php' +description = """C++ library implementing the Voronoi integration as well as the compressed bqb +file format. The present version of libvori is a very early development +version, which is hard-coded to work with the CP2k program package.""" + +toolchain = {'name': 'GCCcore', 'version': '14.2.0'} + +source_urls = ['https://brehm-research.de/files/'] +sources = [SOURCE_TAR_GZ] +checksums = ['1cfa98c564814bddacf1c0e7f11582137d758668f6307e6eb392c72317984c14'] + +builddependencies = [ + ('CMake', '3.31.3'), + ('binutils', '2.42'), +] + +sanity_check_paths = { + 'files': ['lib/libvori.a'], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxc/libxc-7.0.0-GCC-14.2.0.eb b/easybuild/easyconfigs/l/libxc/libxc-7.0.0-GCC-14.2.0.eb new file mode 100644 index 000000000000..e9cb972bd561 --- /dev/null +++ b/easybuild/easyconfigs/l/libxc/libxc-7.0.0-GCC-14.2.0.eb @@ -0,0 +1,48 @@ +easyblock = 'CMakeMake' + +name = 'libxc' +version = '7.0.0' + +homepage = 'https://libxc.gitlab.io' +description = """Libxc is a library of exchange-correlation functionals for density-functional theory. + The aim is to provide a portable, well tested and reliable set of exchange and correlation functionals.""" + +toolchain = {'name': 'GCC', 'version': '14.2.0'} + +source_urls = ['https://gitlab.com/%(name)s/%(name)s/-/archive/%(version)s/'] +sources = [SOURCE_TAR_GZ] +checksums = ['8d4e343041c9cd869833822f57744872076ae709a613c118d70605539fb13a77'] + +builddependencies = [ + ('CMake', '3.31.3'), + ('Perl', '5.40.0'), +] + +local_common_configopts = "-DENABLE_FORTRAN=ON -DENABLE_XHOST=OFF " + +# don't disable building of third and fourth derivates, since it's required by some software that depends on libxc +# (like ABINIT, which requires "3rd derivatives of energy") +# see also https://github.com/pyscf/pyscf/issues/1103 +local_common_configopts += "-DDISABLE_KXC=OFF -DDISABLE_LXC=OFF" + +# perform iterative build to get both static and shared libraries +configopts = [ + local_common_configopts + ' -DBUILD_SHARED_LIBS=OFF', + local_common_configopts + ' -DBUILD_SHARED_LIBS=ON', +] + +# make sure that built libraries (libxc*.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': ['bin/xc-info'] + + ['lib/libxc%s.%s' % (x, y) for x in ['', 'f03'] for y in ['a', SHLIB_EXT]], + 'dirs': ['include', 'lib/pkgconfig', 'lib/cmake/Libxc'], +} + +sanity_check_commands = ['xc-info 1'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb b/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb new file mode 100644 index 000000000000..19cf3fff2b36 --- /dev/null +++ b/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'libxsmm' +version = '1.17' + +homepage = 'https://github.com/libxsmm/libxsmm' +description = """LIBXSMM is a library for small dense and small sparse matrix-matrix multiplications +targeting Intel Architecture (x86).""" + +toolchain = {'name': 'GCC', 'version': '14.2.0'} + +source_urls = ['https://github.com/libxsmm/libxsmm/archive/'] +sources = ['%(version)s.tar.gz'] +checksums = ['8b642127880e92e8a75400125307724635ecdf4020ca4481e5efe7640451bb92'] + +# install both static and dynamic version +installopts = ['PREFIX=%(installdir)s', 'PREFIX=%(installdir)s STATIC=0'] + +skipsteps = ['configure'] +maxparallel = 1 + +sanity_check_paths = { + 'files': ['bin/libxsmm_gemm_generator', 'include/libxsmm.h', 'lib/libxsmm.a', 'lib/libxsmm.%s' % SHLIB_EXT], + 'dirs': ['share'] +} + +moduleclass = 'math' From eb5aeaed653a742d1c7b7e6e1803a870073019e9 Mon Sep 17 00:00:00 2001 From: Maxim Date: Mon, 18 Aug 2025 13:11:59 +0200 Subject: [PATCH 2/3] Delete easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb --- .../c/CP2K/CP2K-2025.2-foss-2025a.eb | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb b/easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb deleted file mode 100644 index b8eb323dd15b..000000000000 --- a/easybuild/easyconfigs/c/CP2K/CP2K-2025.2-foss-2025a.eb +++ /dev/null @@ -1,45 +0,0 @@ -## -# Author: Robert Mijakovic -## -name = 'CP2K' -version = '2025.2' - -homepage = 'https://www.cp2k.org/' -description = """CP2K is a freely available (GPL) program, written in Fortran 95, to perform atomistic and molecular - simulations of solid state, liquid, molecular and biological systems. It provides a general framework for different - methods such as e.g. density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW), and - classical pair and many-body potentials. """ - -toolchain = {'name': 'foss', 'version': '2025a'} -toolchainopts = {'pic': True, 'openmp': True} - -source_urls = ['https://github.com/cp2k/cp2k/releases/download/v%(version)s/'] -sources = [SOURCELOWER_TAR_BZ2] -checksums = ['c8392a4e123304644ec8d241443796277c6ed7ae977452317e779f3c387c2e19'] - -builddependencies = [ - ('flex', '2.6.4'), - ('Bison', '3.8.2'), -] - -dependencies = [ - ('Libint', '2.11.1', '-lmax-6-cp2k'), - ('libxc', '7.0.0'), - ('libvori', '220621'), - ('FFTW', '3.3.10'), - ('PLUMED', '2.9.4'), -] -if ARCH == 'x86_64': - # LIBXSMM is not supported supported on ARM with GCC 12.2.0 and 12.3.0 - # see https://www.cp2k.org/dev:compiler_support - dependencies += [ - ('libxsmm', '1.17'), - ] - -type = 'psmp' - -# regression test reports handful of failures, -# we're assuming those are OK to ignore... -ignore_regtest_fails = True - -moduleclass = 'chem' From 005f93dd4ea37c44fffa536b5a793be9b9688512 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 22 Nov 2025 21:13:21 +0100 Subject: [PATCH 3/3] add sanity check command for libxsmm --- easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb b/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb index 19cf3fff2b36..f2c34ab2ce7e 100644 --- a/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb +++ b/easybuild/easyconfigs/l/libxsmm/libxsmm-1.17-GCC-14.2.0.eb @@ -24,4 +24,6 @@ sanity_check_paths = { 'dirs': ['share'] } +sanity_check_commands = ["libxsmm_gemm_generator | grep ^Usage"] + moduleclass = 'math'