Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix configure step for ELSI 2.5.0+ (and add missing foss versions) #17288

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.5.0-foss-2019b-PEXSI.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name = 'ELSI'
version = '2.5.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': '2019b'}
toolchainopts = {'usempi': True, 'pic': True}

source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2020/02/']
sources = [SOURCELOWER_TAR_GZ]
patches = ['%(name)s-%(version)s_fix-compiler-detection.patch']
checksums = [
'f4d77c4291341c9708ab8070dc4ec683577b3556e7d9f214370d626dc6a4753f',
'4ffb0bb91fa385ffc4884fe0bb3a8b6ef69107aef9e6f0e8c4f5f19eaf7c0fb5',
]

builddependencies = [
('flex', '2.6.4'),
('Bison', '3.3.2'),
('CMake', '3.15.3'),
]

dependencies = [
('ELPA', '2019.11.001'),
# SLEPc and internal PEXSI can't coexist due to conflicting dependencies
# ('SLEPc', '3.12.2', '-Python-3.7.4'),
]

build_internal_pexsi = True

runtest = True

moduleclass = 'math'
38 changes: 38 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.5.0-foss-2019b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name = 'ELSI'
version = '2.5.0'

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': '2019b'}
toolchainopts = {'usempi': True, 'pic': True}

source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2020/02/']
sources = [SOURCELOWER_TAR_GZ]
patches = ['%(name)s-%(version)s_fix-compiler-detection.patch']
checksums = [
'f4d77c4291341c9708ab8070dc4ec683577b3556e7d9f214370d626dc6a4753f',
'4ffb0bb91fa385ffc4884fe0bb3a8b6ef69107aef9e6f0e8c4f5f19eaf7c0fb5',
]

builddependencies = [
('flex', '2.6.4'),
('Bison', '3.3.2'),
('CMake', '3.15.3'),
]

dependencies = [
('ELPA', '2019.11.001'),
('SLEPc', '3.12.2', '-Python-3.7.4'),
]

# SLEPc and internal PEXSI can't coexist due to conflicting dependencies
build_internal_pexsi = False

runtest = True

moduleclass = 'math'
6 changes: 5 additions & 1 deletion easybuild/easyconfigs/e/ELSI/ELSI-2.5.0-intel-2019b-PEXSI.eb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ toolchainopts = {'usempi': True, 'pic': True}

source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2020/02/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['f4d77c4291341c9708ab8070dc4ec683577b3556e7d9f214370d626dc6a4753f']
patches = ['%(name)s-%(version)s_fix-compiler-detection.patch']
checksums = [
'f4d77c4291341c9708ab8070dc4ec683577b3556e7d9f214370d626dc6a4753f',
'4ffb0bb91fa385ffc4884fe0bb3a8b6ef69107aef9e6f0e8c4f5f19eaf7c0fb5',
]

builddependencies = [
('flex', '2.6.4'),
Expand Down
6 changes: 5 additions & 1 deletion easybuild/easyconfigs/e/ELSI/ELSI-2.5.0-intel-2019b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ toolchainopts = {'usempi': True, 'pic': True}

source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2020/02/']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['f4d77c4291341c9708ab8070dc4ec683577b3556e7d9f214370d626dc6a4753f']
patches = ['%(name)s-%(version)s_fix-compiler-detection.patch']
checksums = [
'f4d77c4291341c9708ab8070dc4ec683577b3556e7d9f214370d626dc6a4753f',
'4ffb0bb91fa385ffc4884fe0bb3a8b6ef69107aef9e6f0e8c4f5f19eaf7c0fb5',
]

builddependencies = [
('flex', '2.6.4'),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Let CMake search for the compilers and only fail if they are not found.
See https://gitlab.com/elsi_project/elsi_interface/-/merge_requests/304

Author: Alexander Grund (TU Dresden)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8d22e53..f1570a8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,14 +67,18 @@ SET(INC_PATHS "" CACHE STRING "List of include directories")
SET(LIBS "" CACHE STRING "List of external libraries to be linked against")

### Compilers ###
-IF(NOT DEFINED CMAKE_Fortran_COMPILER)
+INCLUDE(CheckLanguage)
+
+CHECK_LANGUAGE(Fortran)
+IF(NOT CMAKE_Fortran_COMPILER)
MESSAGE(FATAL_ERROR "${MAGENTA}Fortran compiler must be set${COLORRESET}")
ELSE()
MESSAGE(STATUS "${GREEN}Fortran compiler${COLORRESET}: ${CMAKE_Fortran_COMPILER}")
ENABLE_LANGUAGE(Fortran)
ENDIF()
IF(ENABLE_PEXSI OR ENABLE_C_TESTS OR ELPA2_KERNEL STREQUAL "AVX512" OR ELPA2_KERNEL STREQUAL "AVX2" OR ELPA2_KERNEL STREQUAL "AVX")
- IF(NOT DEFINED CMAKE_C_COMPILER)
+ CHECK_LANGUAGE(C)
+ IF(NOT CMAKE_C_COMPILER)
MESSAGE(FATAL_ERROR "${MAGENTA}C compiler must be set${COLORRESET}")
ELSE()
MESSAGE(STATUS "${GREEN}C compiler${COLORRESET}: ${CMAKE_C_COMPILER}")
@@ -82,7 +86,8 @@ IF(ENABLE_PEXSI OR ENABLE_C_TESTS OR ELPA2_KERNEL STREQUAL "AVX512" OR ELPA2_KER
ENDIF()
ENDIF()
IF(ENABLE_PEXSI)
- IF(NOT DEFINED CMAKE_CXX_COMPILER)
+ CHECK_LANGUAGE(CXX)
+ IF(NOT CMAKE_CXX_COMPILER)
MESSAGE(FATAL_ERROR "${MAGENTA}C++ compiler must be set${COLORRESET}")
ELSE()
MESSAGE(STATUS "${GREEN}C++ compiler${COLORRESET}: ${CMAKE_CXX_COMPILER}")
2 changes: 2 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.6.4-foss-2020b-PEXSI.eb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2020/11
sources = [SOURCELOWER_TAR_GZ]
patches = [
'pexsi-1.2.0-mpi30.patch',
'%(name)s-%(version)s_fix-compiler-detection.patch',
'ELSI-2.7.1_bison_3.7_compat.patch',
]
checksums = [
'e43fc12b4954ecd70813fcb45aaef39779f7d9bb5270bbc7246e88d92c8b1dc4', # elsi-2.6.4.tar.gz
'd5580de710cee652c27622f167a10933f792546481d9c08d62f452885cb63abb', # pexsi-1.2.0-mpi30.patch
'43b7112e4b0e9e3da2d353947bf3a0b3d1773463d8af831ef335a0e073e95a37', # ELSI-2.6.4_fix-compiler-detection.patch
'986f95c2eb22c8a8bef13357a10242dcf0a0fac562c88bdc9bdf46cc6e7a1edb', # ELSI-2.7.1_bison_3.7_compat.patch
]

Expand Down
2 changes: 2 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.6.4-intel-2020b-PEXSI.eb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2020/11
sources = [SOURCELOWER_TAR_GZ]
patches = [
'pexsi-1.2.0-mpi30.patch',
'%(name)s-%(version)s_fix-compiler-detection.patch',
'ELSI-2.7.1_bison_3.7_compat.patch',
]
checksums = [
'e43fc12b4954ecd70813fcb45aaef39779f7d9bb5270bbc7246e88d92c8b1dc4', # elsi-2.6.4.tar.gz
'd5580de710cee652c27622f167a10933f792546481d9c08d62f452885cb63abb', # pexsi-1.2.0-mpi30.patch
'43b7112e4b0e9e3da2d353947bf3a0b3d1773463d8af831ef335a0e073e95a37', # ELSI-2.6.4_fix-compiler-detection.patch
'986f95c2eb22c8a8bef13357a10242dcf0a0fac562c88bdc9bdf46cc6e7a1edb', # ELSI-2.7.1_bison_3.7_compat.patch
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Let CMake search for the compilers and only fail if they are not found.
See https://gitlab.com/elsi_project/elsi_interface/-/merge_requests/304

Author: Alexander Grund (TU Dresden)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f016ec7..9aaf8395 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,18 +55,23 @@ SET(INC_PATHS "" CACHE STRING "List of include directories")
SET(LIBS "" CACHE STRING "List of external libraries to be linked against")

### Compilers ###
-IF(NOT DEFINED CMAKE_Fortran_COMPILER)
+INCLUDE(CheckLanguage)
+
+CHECK_LANGUAGE(Fortran)
+IF(NOT CMAKE_Fortran_COMPILER)
MESSAGE(FATAL_ERROR "${MAGENTA}Fortran compiler must be set${COLORRESET}")
ENDIF()
ENABLE_LANGUAGE(Fortran)

-IF(NOT DEFINED CMAKE_C_COMPILER)
+CHECK_LANGUAGE(C)
+IF(NOT CMAKE_C_COMPILER)
MESSAGE(FATAL_ERROR "${MAGENTA}C compiler must be set${COLORRESET}")
ENDIF()
ENABLE_LANGUAGE(C)

IF(ENABLE_PEXSI)
- IF(NOT DEFINED CMAKE_CXX_COMPILER)
+ CHECK_LANGUAGE(CXX)
+ IF(NOT CMAKE_CXX_COMPILER)
MESSAGE(FATAL_ERROR "${MAGENTA}C++ compiler must be set${COLORRESET}")
ENDIF()
ENABLE_LANGUAGE(CXX)
2 changes: 2 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.7.1-foss-2021a-PEXSI.eb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2021/03
sources = [SOURCELOWER_TAR_GZ]
patches = [
'pexsi-1.2.0-mpi30.patch',
'%(name)s-2.6.4_fix-compiler-detection.patch',
'ELSI-2.7.1_bison_3.7_compat.patch',
]
checksums = [
'4a70b6047c39f4e0fd5eca1b2543bfa600acb8305a05ccaaf823ca045f8a4e4d', # elsi-2.7.1.tar.gz
'd5580de710cee652c27622f167a10933f792546481d9c08d62f452885cb63abb', # pexsi-1.2.0-mpi30.patch
'43b7112e4b0e9e3da2d353947bf3a0b3d1773463d8af831ef335a0e073e95a37', # ELSI-2.6.4_fix-compiler-detection.patch
'986f95c2eb22c8a8bef13357a10242dcf0a0fac562c88bdc9bdf46cc6e7a1edb', # ELSI-2.7.1_bison_3.7_compat.patch
]

Expand Down
2 changes: 2 additions & 0 deletions easybuild/easyconfigs/e/ELSI/ELSI-2.7.1-intel-2021a-PEXSI.eb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ source_urls = ['http://wordpress.elsi-interchange.org/wp-content/uploads/2021/03
sources = [SOURCELOWER_TAR_GZ]
patches = [
'pexsi-1.2.0-mpi30.patch',
'%(name)s-2.6.4_fix-compiler-detection.patch',
'ELSI-2.7.1_bison_3.7_compat.patch',
]
checksums = [
'4a70b6047c39f4e0fd5eca1b2543bfa600acb8305a05ccaaf823ca045f8a4e4d', # elsi-2.7.1.tar.gz
'd5580de710cee652c27622f167a10933f792546481d9c08d62f452885cb63abb', # pexsi-1.2.0-mpi30.patch
'43b7112e4b0e9e3da2d353947bf3a0b3d1773463d8af831ef335a0e073e95a37', # ELSI-2.6.4_fix-compiler-detection.patch
'986f95c2eb22c8a8bef13357a10242dcf0a0fac562c88bdc9bdf46cc6e7a1edb', # ELSI-2.7.1_bison_3.7_compat.patch
]

Expand Down