Skip to content

Commit

Permalink
Configflags adjusted as suggested, EC for external ELAP added
Browse files Browse the repository at this point in the history
  • Loading branch information
sassy committed Jun 12, 2024
1 parent c480fa3 commit 2b5ead1
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Authors:: Dugan Witherick (University of Warwick)
# Updated to 240507
# Help from the FHI-aims developers and Alexander Grund to move to oneAPI is greatly appreciated
# This version makes use of an external ELPA installation.
# Note: You need to know which ELPA kernel was used (see below for details)!
# J. Sassmannshausen (Imperial College London/UK)
##
easyblock = 'CMakeMake'

name = 'FHI-aims'
version = '240507'
versionsuffix = '-ELPA'

homepage = 'https://fhi-aims.org/'
description = """FHI-aims is an efficient, accurate all-electron,
full-potential electronic structure code package for computational molecular
and materials science (non-periodic and periodic systems). The code supports
DFT (semilocal and hybrid) and many-body perturbation theory. FHI-aims is
particularly efficient for molecular systems and nanostructures, while
maintaining high numerical accuracy for all production tasks. Production
calculations handle up to several thousand atoms and can efficiently use (ten)thousands of cores.
This build utilises an external ELPA installation!
"""

toolchain = {'name': 'intel', 'version': '2023a'}
toolchainopts = {'opt': True, 'precise': True, 'usempi': True, 'oneapi': True}

download_instructions = """
The source code must be downloaded manually from the FHI-aims club
(https://fhi-aims.org/get-the-code-menu/login).
Access to the FHI-aims club requires a valid license and registration.
Details on available license options and how to register to access
FHI-aims club may be found at:
https://fhi-aims.org/get-the-code-menu/get-the-code """

sources = ['%(namelower)s.%(version)s.tar.gz']
checksums = ['dea6483834d80ef5d8826171bd710ebcb035c4b971c4c958c82fdb9f03af6a6b']

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

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

configopts = ' -DCMAKE_Fortran_COMPILER="$MPIF90" -DCMAKE_CXX_COMPILER="$MPICXX" -DCMAKE_C_COMPILER="$MPICC" '
configopts += ' -DLIBS="mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64 mkl_intel_lp64 mkl_sequential mkl_core elpa" '
configopts += ' -DLIB_PATHS="$EBROOTIMKL/mkl/latest/lib/intel64" '
configopts += ' -DFortran_MIN_FLAGS="-O0 -fp-model precise" '
# This is for ELPA. Build ELAP first to see which kernel is selected and then adjust the kernel settings here!
# Possible values are: AVX, AVX2 and AVX512
configopts += ' -DUSE_EXTERNAL_ELPA=ON -DELPA2_KERNEL="AVX2" -DINC_PATHS=$EBROOTELPA/include/elpa-2023.05.001/modules/ '
configopts += ' -DTARGET_NAME="aims.x" '

postinstallcmds = ["cp -ar %(builddir)s/%(namelower)s.%(version)s/{CHANGELOG.md,doc} %(installdir)s/",
"cp -ar %(builddir)s/%(namelower)s.%(version)s/{regression_tests,species_defaults} %(installdir)s/",
"cp -ar %(builddir)s/%(namelower)s.%(version)s/{testcases,utilities} %(installdir)s/"]

sanity_check_paths = {
'files': ['bin/aims.x'],
'dirs': [],
}

sanity_check_commands = [
'aims.x --version &> /dev/null'
]

moduleclass = 'chem'
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ builddependencies = [('CMake', '3.26.3')]
configopts = ' -DCMAKE_Fortran_COMPILER="$MPIF90" -DCMAKE_CXX_COMPILER="$MPICXX" -DCMAKE_C_COMPILER="$MPICC" '
configopts += ' -DLIBS="mkl_scalapack_lp64 mkl_blacs_intelmpi_lp64 mkl_intel_lp64 mkl_sequential mkl_core" '
configopts += ' -DLIB_PATHS="$EBROOTIMKL/mkl/latest/lib/intel64" '
configopts += ' -DCMAKE_Fortran_FLAGS="$FFLAGS -fc=ifx -finline-functions" '
configopts += ' -DCMAKE_CXX_FLAGS="$CXXFLAGS -cxx=icpx -finline-functions -std=c++11" '
configopts += ' -DCMAKE_C_FLAGS="$CFLAGS -cc=icx -finline-functions -std=gnu99" '
configopts += ' -DFortran_MIN_FLAGS="-O0 -fp-model precise" '
configopts += ' -DTARGET_NAME="aims.x" '

Expand Down

0 comments on commit 2b5ead1

Please sign in to comment.