-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21831 from PetrKralCZ/20241112092506_new_pr_pyWan…
…nier9020240128 {chem}[foss/2023a] pyWannier90 v2024-01-28
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
easybuild/easyconfigs/p/pyWannier90/pyWannier90-2024-01-28-foss-2023a.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
easyblock = 'MakeCp' | ||
|
||
name = 'pyWannier90' | ||
local_commit = 'c3f65d7' | ||
version = '2024-01-28' | ||
|
||
homepage = 'https://github.com/hungpham2017/pyWannier90' | ||
description = "A Wannier90 Python interface for VASP and PySCF" | ||
|
||
toolchain = {'name': 'foss', 'version': '2023a'} | ||
|
||
local_wannier90_version = '3.1.0' | ||
|
||
sources = [ | ||
{ | ||
'source_urls': ['https://github.com/hungpham2017/pyWannier90/archive/'], | ||
'download_filename': '%s.tar.gz' % local_commit, | ||
'filename': SOURCE_TAR_GZ | ||
}, | ||
{ | ||
'source_urls': ['https://github.com/wannier-developers/wannier90/archive/'], | ||
'download_filename': 'v%s.tar.gz' % local_wannier90_version, | ||
'filename': 'Wannier90-%s.tar.gz' % local_wannier90_version, | ||
}, | ||
] | ||
checksums = [ | ||
{'pyWannier90-2024-01-28.tar.gz': '9828dcdde92b9627cfe888b5be530040c1c51c97f5a3c930d82ef24d862610e3'}, | ||
{'Wannier90-3.1.0.tar.gz': '40651a9832eb93dec20a8360dd535262c261c34e13c41b6755fa6915c936b254'}, | ||
] | ||
|
||
builddependencies = [ | ||
('pybind11', '2.11.1'), | ||
] | ||
|
||
dependencies = [ | ||
('Python', '3.11.3'), | ||
('SciPy-bundle', '2023.07'), | ||
('PySCF', '2.7.0'), | ||
] | ||
|
||
local_wannier90_make = 'make -j %(parallel)s F90="$F90" FCOPTS="$FFLAGS -fPIC" LDOPTS="$FFLAGS" ' | ||
local_wannier90_make += 'LIBDIR="$LAPACK_LIB_DIR" LIBS="$LIBLAPACK"' | ||
|
||
prebuildopts = "sed -i 's/ -undefined dynamic_lookup//g' src/Makefile && " | ||
prebuildopts += "cd %%(builddir)s/wannier90-%s && touch make.inc && " % local_wannier90_version | ||
prebuildopts += "cp %(builddir)s/pyWannier90-*/src/wannier_lib.F90 src/wannier_lib.F90 && " | ||
prebuildopts += local_wannier90_make + " && " | ||
prebuildopts += local_wannier90_make + " lib && " | ||
prebuildopts += "cd %(builddir)s/pyWannier90-*/src && " | ||
|
||
buildopts = 'CPP="$CXX" LIBS="-L%%(builddir)s/wannier90-%s $LIBLAPACK -lwannier" ' % local_wannier90_version | ||
# with Intel compilers, use libwannier90_intel as make target | ||
# with GCC compilers, use libwannier90_gf as make target | ||
buildopts += "libwannier90_gf && " | ||
buildopts += """sed -i "s@W90LIB = .*@W90LIB = '%(installdir)s'@g" pywannier90.py""" | ||
|
||
files_to_copy = [ | ||
(['src/pywannier90.py', 'src/libwannier90.*.%s' % SHLIB_EXT], 'lib/python%(pyshortver)s/site-packages'), | ||
] | ||
|
||
sanity_check_paths = { | ||
'files': [], | ||
'dirs': ['lib/python%(pyshortver)s/site-packages'], | ||
} | ||
|
||
sanity_check_commands = [ | ||
"python -c 'import libwannier90'", | ||
"python -c 'import pywannier90'", | ||
] | ||
|
||
modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} | ||
|
||
moduleclass = 'chem' |