Skip to content
Open
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
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ if("$ENV{USE_ACC}" STREQUAL "OFF")
set(USE_ACC OFF)
endif()
message(STATUS "USE_ACC: ${USE_ACC}")
set(USE_MPI True)
# NOTE: SlaterGPU contains no MPI code (no MPI_* calls, no <mpi.h>, no target
# links MPI::*). MPI is owned entirely by the ZEST/XCtera layers above, which
# find and link it themselves. So there is intentionally no find_package(MPI)
# or USE_MPI flag here — keeping the layer MPI-agnostic is what lets a
# USE_MPI=OFF stack configure without MPI present. See ZEST#92.
set(USE_OMP True)
set(RED_DOUBLE True)

Expand All @@ -47,9 +51,6 @@ endif()

set(CMAKE_CXX_FLAGS_RELEASE "-O2")

if(USE_MPI)
find_package(MPI REQUIRED)
endif()
if (USE_OMP)
find_package(OpenMP REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
Expand Down
5 changes: 4 additions & 1 deletion SlaterGPUConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
include(CMakeFindDependencyMacro)

# Find required dependencies
# NOTE: no find_dependency(MPI) — SlaterGPU uses no MPI itself. Re-requiring it
# here would force every consumer to locate MPI at find_package(SlaterGPU) time,
# which blocks a USE_MPI=OFF stack. Consumers that use MPI (ZEST/XCtera) find it
# themselves. See ZEST#92.
find_dependency(OpenMP REQUIRED)
find_dependency(MPI REQUIRED)
find_dependency(BLAS REQUIRED)
find_dependency(LAPACK REQUIRED)

Expand Down
Loading