Skip to content
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
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ FetchContent_Declare( linalg_cmake_modules
)
FetchContent_MakeAvailable( linalg_cmake_modules )
set(CMAKE_MODULE_PATH "${linalg_cmake_modules_SOURCE_DIR}" ${CMAKE_MODULE_PATH})
message("CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
################################################################################
# bilke cmake modules
FetchContent_Declare( bilke_cmake_modules
GIT_REPOSITORY https://github.com/bilke/cmake-modules.git
GIT_TAG main
GIT_TAG master
)
FetchContent_MakeAvailable( bilke_cmake_modules )
set(CMAKE_MODULE_PATH "${bilke_cmake_modules_SOURCE_DIR}" ${CMAKE_MODULE_PATH})
message("CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
################################################################################
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${POLYQUANT_BINARY_DIR}/lib CACHE PATH "Single output directory for building all libraries.")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${POLYQUANT_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")
Expand Down Expand Up @@ -146,6 +148,12 @@ endif(POLYQUANT_DOC)
# OpenMP for parallelization
find_package(OpenMP REQUIRED)
########################################
# LinAlg
# set this list to prioritize a BLAS type
set( BLAS_PREFERENCE_LIST "BLIS" "IntelMKL" "IBMESSL" "OpenBLAS" "ReferenceBLAS" )
find_package( BLAS REQUIRED )
find_package( LAPACK REQUIRED )
########################################
# json parsing
FetchContent_Declare(
nlohmann_json
Expand Down Expand Up @@ -188,11 +196,6 @@ if (NOT TARGET Eigen3::Eigen)
FetchContent_MakeAvailable(Eigen)
endif (NOT TARGET Eigen3::Eigen)
########################################
# LinAlg
# set this list to prioritize a BLAS type
set( LinAlg_BLAS_PREFERENCE_LIST "BLIS" "IntelMKL" "IBMESSL" "OpenBLAS" "ReferenceBLAS" )
find_package(LinAlg REQUIRED)
########################################
# Spectra for sparse math
FetchContent_Declare(
spectra
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ add_subdirectory(scf)
add_subdirectory(ci)

# include_directories(${MKL_INCLUDE_DIR})
target_link_libraries(polyquant_lib PUBLIC LinAlg::linalg)
target_link_libraries(polyquant_lib PUBLIC BLAS::BLAS)
target_link_libraries(polyquant_lib PUBLIC LAPACK::LAPACK)
target_link_libraries(polyquant_lib PUBLIC cxxopts)
target_link_libraries(polyquant_lib PUBLIC OpenMP::OpenMP_CXX)
if(Eigen3_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion src/calculation/calculation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ void POLYQUANT_CALCULATION::dump_post_mf_for_qmcpack(std::string &filename) {
dets[idx_part][idx_spin].resize(this->ci_calc->detset.N_dets, std::vector<uint64_t>(N_bits, 0ul));
}
}
#pragma omp parallel
#pragma omp parallel for
for (auto i = 0; i < this->ci_calc->detset.N_dets; i++) {
auto i_unfold = this->ci_calc->detset.det_idx_unfold(i);
for (int idx_part = 0; idx_part < this->input_molecule->quantum_particles.size(); idx_part++) {
Expand Down