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
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Rensselaer's Optimistic Simulation System — a parallel discrete-event simulato
Typical manual configure:

```
cmake -S . -B build -DROSS_BUILD_MODELS=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_BUILD_TYPE=Debug
cmake -S . -B build -DROSS_BUILD_MODELS=ON -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j
cmake --install build
```

Models are **not** built by default — pass `-DROSS_BUILD_MODELS=ON` to include `phold` and any symlinked-in models. `BUILD_TESTING=ON` enables the ctest suite.

MPI is required. The top-level `CMakeLists.txt` does per-arch detection via `CMAKE_SYSTEM_PROCESSOR` and falls back to a `gtod` clock if unrecognized. Set `-DROSS_CLOCK_OVERRIDE=YES` to force the gtod clock.
MPI is required and auto-discovered via `find_package(MPI)` — do not set `CC=mpicc` or `-DCMAKE_C_COMPILER=mpicc`. For non-standard installs, hint with `-DMPI_HOME=...` or `module load <mpi>` before configuring. The top-level `CMakeLists.txt` does per-arch detection via `CMAKE_SYSTEM_PROCESSOR` and falls back to a `gtod` clock if unrecognized. Set `-DROSS_CLOCK_OVERRIDE=YES` to force the gtod clock.

## Running a model

Expand Down
13 changes: 4 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,10 @@ ENDIF(VALID_ARCH AND NOT ${ROSS_CLOCK_OVERRIDE})


## MPI
INCLUDE(SetupMPI)
IF(MPI_C_FOUND)
INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH})
LIST(APPEND ROSS_EXTERNAL_LIBS ${MPI_C_LIBRARIES})
ELSE(MPI_C_FOUND)
MESSAGE("WARNING: Could not find MPI!")
MESSAGE(" Either add an MPI compiler to your path (using modules)")
MESSAGE(" Or force CMake to build using the correct compiler (`export CC=mpicc`)")
ENDIF(MPI_C_FOUND)
# MPI is required; build the system C compiler against MPI::MPI_C rather than
# forcing CC=mpicc. For non-standard installs, hint with -DMPI_HOME=... or
# `module load <mpi>` before configuring.
find_package(MPI REQUIRED COMPONENTS C)

# Code coverage instrumentation (GCC/Clang only). Applied at directory scope
# so flags propagate to core/ and models/. Collect with lcov/gcovr after ctest.
Expand Down
6 changes: 4 additions & 2 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ OPTION(ROSS_BUILD_SHARED_LIBS "Build shared libraries instead of static" OFF)
SET(BUILD_SHARED_LIBS ${ROSS_BUILD_SHARED_LIBS})
ADD_LIBRARY(ROSS ${ross_srcs})
SET_TARGET_PROPERTIES(ROSS PROPERTIES OUTPUT_NAME ROSS)
TARGET_LINK_LIBRARIES(ROSS ${ROSS_EXTERNAL_LIBS})
TARGET_INCLUDE_DIRECTORIES(ROSS INTERFACE ${MPI_C_INCLUDE_PATH})
# MPI is PUBLIC because core/ross.h does `#include <mpi.h>` — consumers must
# inherit the MPI include path and link against MPI when they link ROSS.
target_link_libraries(ROSS PUBLIC MPI::MPI_C)
target_link_libraries(ROSS PRIVATE m)

# Build Specific Config Header
CONFIGURE_FILE(config.h.in config.h)
Expand Down
77 changes: 0 additions & 77 deletions core/cmake/SetupMPI.cmake

This file was deleted.

Loading