Skip to content

Commit

Permalink
fix blacs lib in UT (#4338)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzx10 authored Jun 9, 2024
1 parent b629044 commit 38cc0f1
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions source/module_base/test_parallel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,22 @@ add_test(NAME base_parallel_reduce_test
)

if(ENABLE_LCAO)
AddTest(
TARGET blacs_connector
LIBS MPI::MPI_CXX ScaLAPACK::ScaLAPACK
SOURCES blacs_connector_test.cpp
)
install(FILES blacs_connector_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME blacs_connector_test
COMMAND ${BASH} blacs_connector_test.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
# figure out the lib that provides BLACS
if(MKLROOT)
set(BLACS_LIB IntelMKL::MKL)
else()
set(BLACS_LIB ScaLAPACK::ScaLAPACK)
endif()

AddTest(
TARGET blacs_connector
LIBS MPI::MPI_CXX ${BLACS_LIB}
SOURCES blacs_connector_test.cpp
)
install(FILES blacs_connector_test.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_test(NAME blacs_connector_test
COMMAND ${BASH} blacs_connector_test.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif()

0 comments on commit 38cc0f1

Please sign in to comment.