Skip to content
Closed
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
5 changes: 4 additions & 1 deletion .github/actions/setup-macos-toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ runs:
shell: bash
run: |
brew update
brew install ninja mpich llvm libomp openssl
brew install \
ninja open-mpi llvm libomp openssl \
autoconf automake libtool libfabric \
coreutils gnu-sed grep gawk pkgconf
brew link libomp --overwrite --force
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup environment
run: |
sudo apt-get update
sudo apt-get install -y gcc-15 g++-15 ninja-build mpich libomp-dev valgrind
sudo apt-get install -y gcc-15 g++-15 ninja-build openmpi-bin libopenmpi-dev libomp-dev valgrind
python3 -m pip install -r requirements.txt
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
with:
path: install
name: macos-clang-install
- name: Run func tests (MPI)
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4
- name: Run func tests (MPI/OSH)
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe"
env:
PPC_NUM_THREADS: 1
PPC_TASK_MAX_TIME: 30
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- uses: actions/checkout@v6
- name: Setup environment
run: |
apt-get update
apt-get install -y --no-install-recommends openmpi-bin libopenmpi-dev
python3 -m pip install -r requirements.txt --break-system-packages --ignore-installed
- name: Download installed package
uses: ./.github/actions/download-install
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/static-analysis-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ jobs:
create-symlink: true
max-size: 1G

- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev

- name: CMake configure
run: >
cmake -S . -B build -G Ninja
Expand Down Expand Up @@ -117,6 +123,12 @@ jobs:
create-symlink: true
max-size: 1G

- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev

- name: CMake configure
run: >
cmake -S . -B build -G Ninja
Expand Down
43 changes: 39 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
key: ${{ runner.os }}-gcc
create-symlink: true
max-size: 1G
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: CMake configure
run: >
cmake -S . -B build -G Ninja
Expand Down Expand Up @@ -86,7 +91,12 @@ jobs:
with:
path: install
name: ubuntu-gcc-install-${{ matrix.os }}
- name: Run func tests (MPI)
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: Run func tests (MPI/OSH)
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe"
env:
PPC_NUM_THREADS: 1
Expand Down Expand Up @@ -139,6 +149,11 @@ jobs:
key: ${{ runner.os }}-clang
create-symlink: true
max-size: 1G
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: CMake configure
run: >
cmake -S . -B build -G Ninja
Expand Down Expand Up @@ -182,7 +197,12 @@ jobs:
with:
path: install
name: ubuntu-clang-install-${{ matrix.os }}
- name: Run func tests (MPI)
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: Run func tests (MPI/OSH)
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe"
env:
PPC_NUM_THREADS: 1
Expand Down Expand Up @@ -237,6 +257,11 @@ jobs:
key: ${{ runner.os }}-clang
create-symlink: true
max-size: 1G
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: CMake configure
run: >
cmake -S . -B build -G Ninja
Expand Down Expand Up @@ -282,7 +307,12 @@ jobs:
with:
path: install
name: ubuntu-clang-sanitizer-install-${{ matrix.os }}
- name: Run tests (MPI)
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: Run tests (MPI/OSH)
run: scripts/run_tests.py --running-type="processes" --counts 2 --additional-mpi-args="--oversubscribe"
env:
PPC_NUM_THREADS: 2
Expand Down Expand Up @@ -347,6 +377,11 @@ jobs:
key: ${{ runner.os }}-gcc
create-symlink: true
max-size: 1G
- name: Install Open MPI/OSH dependencies
run: >
apt-get update &&
apt-get install -y --no-install-recommends
openmpi-bin libopenmpi-dev
- name: CMake configure
run: >
cmake -S . -B build -G Ninja
Expand All @@ -360,7 +395,7 @@ jobs:
- name: Install project
run: |
cmake --build build --target install -- --quiet
- name: Run tests (MPI)
- name: Run tests (MPI/OSH)
run: scripts/run_tests.py --running-type="processes" --additional-mpi-args="--oversubscribe"
env:
PPC_NUM_PROC: 2
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "3rdparty/benchmark"]
path = 3rdparty/benchmark
url = https://github.com/google/benchmark
[submodule "3rdparty/SOS"]
path = 3rdparty/SOS
url = https://github.com/Sandia-OpenSHMEM/SOS
1 change: 1 addition & 0 deletions 3rdparty/SOS
Submodule SOS added at 45e6e7
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ if(PPC_BUILD_COMPONENTS)
# ################ Parallel programming technologies #################

message(STATUS "PPC step: Setup parallel programming technologies")
foreach(dep mpi openmp onetbb)
set(PPC_PARALLEL_TECHNOLOGIES mpi openmp onetbb)
set(ppc_osh_supported OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(ppc_osh_supported ON)
set(ppc_osh_backend "openmpi")
list(APPEND PPC_PARALLEL_TECHNOLOGIES osh)
elseif(APPLE)
set(ppc_osh_supported ON)
set(ppc_osh_backend "sos")
list(APPEND PPC_PARALLEL_TECHNOLOGIES osh)
endif()
foreach(dep ${PPC_PARALLEL_TECHNOLOGIES})
include(cmake/${dep}.cmake)
endforeach()

Expand Down
7 changes: 7 additions & 0 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ function(add_tests test_flag exec_target subdir)
# Gather all source files under tests/<subdir>
file(GLOB_RECURSE src_files "${TEST_DIR}/${subdir}/*.cpp"
"${TEST_DIR}/${subdir}/*.cxx" "${TEST_DIR}/${subdir}/*.cc")
if(NOT ppc_osh_supported)
list(FILTER src_files EXCLUDE REGEX "(/|\\\\)osh\\.(cpp|cxx|cc)$")
endif()
target_sources(${exec_target} PRIVATE ${src_files})
list(APPEND TEST_EXECUTABLES ${exec_target})
set(TEST_EXECUTABLES
Expand All @@ -34,6 +37,10 @@ function(setup_implementation)
cmake_parse_arguments(SETUP "" # no plain options
"NAME;PROJ_NAME;BASE_DIR" "TESTS" ${ARGN})

if(SETUP_NAME STREQUAL "osh" AND NOT ppc_osh_supported)
return()
endif()

# skip if impl dir doesn't exist
set(IMP_DIR "${SETUP_BASE_DIR}/${SETUP_NAME}")
if(NOT EXISTS "${IMP_DIR}")
Expand Down
16 changes: 15 additions & 1 deletion cmake/mpi.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
include_guard()

find_package(MPI REQUIRED COMPONENTS CXX)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_program(ppc_openmpi_c_wrapper NAMES mpicc.openmpi mpicc)
find_program(ppc_openmpi_cxx_wrapper NAMES mpicxx.openmpi mpicxx
mpic++.openmpi mpic++)
if(ppc_openmpi_c_wrapper AND ppc_openmpi_cxx_wrapper)
set(MPI_C_COMPILER
"${ppc_openmpi_c_wrapper}"
CACHE FILEPATH "MPI C compiler wrapper" FORCE)
set(MPI_CXX_COMPILER
"${ppc_openmpi_cxx_wrapper}"
CACHE FILEPATH "MPI CXX compiler wrapper" FORCE)
endif()
endif()

find_package(MPI REQUIRED COMPONENTS C CXX)
if(NOT MPI_FOUND)
message(FATAL_ERROR "MPI NOT FOUND")
endif()
Expand Down
Loading
Loading