3
0
mirror of https://github.com/triqs/dft_tools synced 2024-08-06 20:40:00 +02:00

Merge remote-tracking branch 'app4triqs-remote/unstable' into unstable

This commit is contained in:
Nils Wentzell 2023-08-23 16:54:42 -04:00
commit 0c65844c7b
8 changed files with 44 additions and 89 deletions

View File

@ -28,7 +28,7 @@ jobs:
run: > run: >
sudo apt-get update && sudo apt-get update &&
sudo apt-get install lsb-release wget software-properties-common && sudo apt-get install lsb-release wget software-properties-common &&
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 13 && wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 &&
sudo apt-get install sudo apt-get install
clang-15 clang-15
g++-12 g++-12
@ -67,6 +67,11 @@ jobs:
pip3 install mako numpy scipy mpi4py pip3 install mako numpy scipy mpi4py
pip3 install -r requirements.txt pip3 install -r requirements.txt
- name: add clang cxxflags
if: ${{ contains(matrix.cxx, 'clang') }}
run:
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
- name: Build & Install TRIQS - name: Build & Install TRIQS
env: env:
CC: ${{ matrix.cc }} CC: ${{ matrix.cc }}

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
compile_commands.json compile_commands.json
doc/_autosummary
doc/cpp2rst_generated doc/cpp2rst_generated

View File

@ -74,7 +74,7 @@ endif()
# Documentation # Documentation
option(Build_Documentation "Build documentation" OFF) option(Build_Documentation "Build documentation" OFF)
if(Build_Documentation AND NOT PythonSupport) if(NOT IS_SUBPROJECT AND (Build_Documentation AND NOT PythonSupport))
message(FATAL_ERROR "Build_Documentation=ON requires PythonSupport to be enabled") message(FATAL_ERROR "Build_Documentation=ON requires PythonSupport to be enabled")
endif() endif()
@ -111,16 +111,18 @@ target_compile_options(${PROJECT_NAME}_warnings
$<$<CXX_COMPILER_ID:GNU>:-Wno-comma-subscript> $<$<CXX_COMPILER_ID:GNU>:-Wno-comma-subscript>
$<$<CXX_COMPILER_ID:GNU>:-Wshadow=local> $<$<CXX_COMPILER_ID:GNU>:-Wshadow=local>
$<$<CXX_COMPILER_ID:GNU>:-Wno-attributes> $<$<CXX_COMPILER_ID:GNU>:-Wno-attributes>
$<$<CXX_COMPILER_ID:Clang>:-Wno-deprecated-comma-subscript> $<$<CXX_COMPILER_ID:Clang,IntelLLVM>:-Wno-deprecated-comma-subscript>
$<$<CXX_COMPILER_ID:Clang>:-Wno-unknown-warning-option> $<$<CXX_COMPILER_ID:Clang,IntelLLVM>:-Wno-unknown-warning-option>
$<$<CXX_COMPILER_ID:Clang>:-Wshadow> $<$<CXX_COMPILER_ID:Clang,IntelLLVM>:-Wshadow>
$<$<CXX_COMPILER_ID:Clang>:-Wno-gcc-compat> $<$<CXX_COMPILER_ID:Clang,IntelLLVM>:-Wno-gcc-compat>
$<$<CXX_COMPILER_ID:Clang>:-Wno-c++20-extensions> $<$<CXX_COMPILER_ID:Clang,IntelLLVM>:-Wno-c++20-extensions>
$<$<CXX_COMPILER_ID:Clang,IntelLLVM>:-Wno-c++20-compat>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-deprecated-comma-subscript> $<$<CXX_COMPILER_ID:AppleClang>:-Wno-deprecated-comma-subscript>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-unknown-warning-option> $<$<CXX_COMPILER_ID:AppleClang>:-Wno-unknown-warning-option>
$<$<CXX_COMPILER_ID:AppleClang>:-Wshadow> $<$<CXX_COMPILER_ID:AppleClang>:-Wshadow>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-gcc-compat> $<$<CXX_COMPILER_ID:AppleClang>:-Wno-gcc-compat>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-c++20-extensions> $<$<CXX_COMPILER_ID:AppleClang>:-Wno-c++20-extensions>
$<$<CXX_COMPILER_ID:AppleClang>:-Wno-c++20-compat>
) )
# ############# # #############
@ -148,7 +150,7 @@ if(PythonSupport)
endif() endif()
# Docs # Docs
if(Build_Documentation) if(NOT IS_SUBPROJECT AND Build_Documentation)
add_subdirectory(doc) add_subdirectory(doc)
endif() endif()

View File

@ -49,7 +49,7 @@ if(ANALYZE_SOURCES)
TARGET ${PROJECT_NAME}_c TARGET ${PROJECT_NAME}_c
COMMAND ${CPPCHECK_EXECUTABLE} COMMAND ${CPPCHECK_EXECUTABLE}
--enable=warning,style,performance,portability --enable=warning,style,performance,portability
--std=c++20 --std=c++23
--template=gcc --template=gcc
--verbose --verbose
--force --force
@ -64,21 +64,36 @@ if(ANALYZE_SOURCES)
endif() endif()
# ========= Dynamic Analyzer Checks ========== # ========= Dynamic Analyzer Checks ==========
option(ASAN OFF "Compile library and executables with LLVM Address Sanitizer") option(ASAN OFF "Compile library and executables with LLVM Address Sanitizer")
option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer")
if(ASAN) if(ASAN)
if(NOT TARGET asan) if(NOT TARGET asan)
find_package(sanitizer REQUIRED "asan") find_package(sanitizer REQUIRED COMPONENTS asan)
endif() endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:asan>) target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:asan>)
endif() endif()
option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer")
if(UBSAN) if(UBSAN)
if(NOT TARGET ubsan) if(NOT TARGET ubsan)
find_package(sanitizer REQUIRED "ubsan") find_package(sanitizer REQUIRED COMPONENTS ubsan)
endif() endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:ubsan>) target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:ubsan>)
endif() endif()
option(MSAN OFF "Compile library and executables with LLVM Memory Sanitizer")
if(MSAN)
if(NOT TARGET msan)
find_package(sanitizer REQUIRED COMPONENTS msan)
endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:msan>)
endif()
option(TSAN OFF "Compile library and executables with LLVM Thread Sanitizer")
if(TSAN)
if(NOT TARGET tsan)
find_package(sanitizer REQUIRED COMPONENTS tsan)
endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:tsan>)
endif()

2
deps/CMakeLists.txt vendored
View File

@ -48,7 +48,7 @@ else()
endif() endif()
# -- Cpp2Py -- # -- Cpp2Py --
if(PythonSupport OR Build_Documentation) if(PythonSupport OR (NOT IS_SUBPROJECT AND Build_Documentation))
external_dependency(Cpp2Py external_dependency(Cpp2Py
GIT_REPO https://github.com/TRIQS/cpp2py GIT_REPO https://github.com/TRIQS/cpp2py
VERSION 2.0 VERSION 2.0

View File

@ -1,70 +0,0 @@
easyblock = 'CMakeMake'
name = 'TRIQS-dft_tools'
version = '3.0.0'
versionsuffix = '-Python-%(pyver)s'
homepage = 'https://triqs.github.io/dft_tools/'
description = """
TRIQS (Toolbox for Research on Interacting Quantum Systems) is a
scientific project providing a set of C++ and Python libraries to
develop new tools for the study of interacting quantum systems.
This TRIQS-based-based application is aimed at ab-initio calculations
for correlated materials, combining realistic DFT band-structure calculation
with the dynamical mean-field theory. Together with the necessary tools to
perform the DMFT self-consistency loop for realistic multi-band problems,
the package provides a full-fledged charge self-consistent interface to the
Wien2K package. In addition, if Wien2k is not available, it provides a generic
interface for one-shot DFT+DMFT calculations, where only the single-particle
Hamiltonian in orbital space has to be provided.
"""
docurls = ['https://triqs.github.io/dft_tools/%(version_major_minor)s.x/']
software_license = 'LicenseGPLv3'
toolchain = {'name': 'foss', 'version': '2019a'}
toolchainopts = {'pic': True, 'usempi': True}
source_urls = ['https://github.com/TRIQS/dft_tools/releases/download/%(version)s/']
sources = ['dft_tools-%(version)s.tar.gz']
checksums = ['PUT HERE THE SHA256 OF THE RELEASE TARBALL']
dependencies = [
('Python', '3.7.2'),
('SciPy-bundle', '2019.03'),
('Boost', '1.70.0'),
('Clang', '8.0.0'),
('GMP', '6.1.2'),
('Mako', '1.0.8'),
('h5py', '2.9.0'),
('TRIQS', '3.0.0', versionsuffix),
]
builddependencies = [
('CMake', '3.13.3')
]
separate_build_dir = True
runtest = 'test'
sanity_check_paths = {
'files': ['bin/dmftproj', 'lib/libtriqs_dft_tools_c.a'],
'dirs': ['include/triqs_dft_tools', 'bin', 'lib', 'share',
'lib/python%(pyshortver)s/site-packages/triqs_dft_tools'],
}
sanity_check_commands = ["python -c 'import triqs_dft_tools'"]
modextrapaths = {
'CPLUS_INCLUDE_PATH': 'include',
'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages',
'CMAKE_PREFIX_PATH': 'lib/cmake/triqs_dft_tools',
}
modextravars = {
'TRIQS_DFT_TOOLS_ROOT': '%(installdir)s',
'TRIQS_DFT_TOOLS_VERSION': '%(version)s',
}
moduleclass = 'phys'

View File

@ -1,7 +1,7 @@
easyblock = 'CMakeMake' easyblock = 'CMakeMake'
name = 'TRIQS-dft_tools' name = 'TRIQS-dft_tools'
version = '3.1.0' version = '3.2.0'
homepage = 'https://triqs.github.io/dft_tools/' homepage = 'https://triqs.github.io/dft_tools/'
description = """ description = """
@ -27,7 +27,7 @@ toolchainopts = {'pic': True, 'usempi': True}
source_urls = ['https://github.com/TRIQS/dft_tools/releases/download/%(version)s/'] source_urls = ['https://github.com/TRIQS/dft_tools/releases/download/%(version)s/']
sources = ['dft_tools-%(version)s.tar.gz'] sources = ['dft_tools-%(version)s.tar.gz']
checksums = ['57b7d0fe5a96c5a42bb684c60ca8e136a33e1385bf6cd7e9d1371fa507dc2ec4'] checksums = ['PUT HERE THE SHA256 OF THE RELEASE TARBALL']
dependencies = [ dependencies = [
('Python', '3.9.6'), ('Python', '3.9.6'),
@ -38,7 +38,7 @@ dependencies = [
('GMP', '6.2.1'), ('GMP', '6.2.1'),
('HDF5', '1.10.7'), ('HDF5', '1.10.7'),
('Mako', '1.1.4'), ('Mako', '1.1.4'),
('TRIQS', '3.1.0'), ('TRIQS', '3.2.0'),
] ]
builddependencies = [ builddependencies = [

View File

@ -60,7 +60,9 @@ macro(extract_flags)
endforeach() endforeach()
get_property_recursive(cxx_features TARGET ${target} PROPERTY INTERFACE_COMPILE_FEATURES) get_property_recursive(cxx_features TARGET ${target} PROPERTY INTERFACE_COMPILE_FEATURES)
if(cxx_std_20 IN_LIST cxx_features) if(cxx_std_23 IN_LIST cxx_features)
set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++2b")
elseif(cxx_std_20 IN_LIST cxx_features)
set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++20") set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++20")
elseif(cxx_std_17 IN_LIST cxx_features) elseif(cxx_std_17 IN_LIST cxx_features)
set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++17") set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++17")