Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
decde5e
Point PaRSEC dependency at its new GitHub home (parsec-4.0.2411) and …
jfonseca-aneo Jul 22, 2026
fc2967c
Port PaRSEC integration to the 4.0 arena/datatype API (arenas_datatyp…
jfonseca-aneo Jul 22, 2026
36bd3e6
Pin googletest to v1.17.0 since its default branch is no longer master
jfonseca-aneo Jul 22, 2026
43dfa5d
Fix dead bitbucket PaRSEC clone URL in README
jfonseca-aneo Jul 22, 2026
59d5af8
Pin PaRSEC to 4659c2706, the commit right before a reshape-of-datacop…
jfonseca-aneo Jul 22, 2026
4cb6cf9
Ignore local PaRSEC checkout/build and the shared thirdparty install …
jfonseca-aneo Jul 22, 2026
c872443
Bump actions/checkout from v2 to v4 in CI workflows
jfonseca-aneo Jul 24, 2026
a9b455c
Update vcpkg pin and drop the now-redundant arm64-linux patch
jfonseca-aneo Jul 24, 2026
67425cc
Bump ADIOS2 to v2.12.1 and drop the removed DebugON arg
jfonseca-aneo Jul 24, 2026
d768a09
Ignore local ADIOS2 checkout/build like vcpkg and PaRSEC
jfonseca-aneo Jul 24, 2026
0f0603f
Rewrite README build instructions for the vcpkg-based CMake workflow
jfonseca-aneo Jul 29, 2026
30be0a5
feat: add SEWASStarPU distributed execution engine
jfonseca-aneo Aug 24, 2026
f32a0d8
feat: wire task priorities into SEWASStarPU
jfonseca-aneo Aug 24, 2026
812cdbd
build: auto-download and build StarPU when not found via pkg-config
jfonseca-aneo Aug 24, 2026
fb316a3
ci: switch Linux CI's distributed backend from PaRSEC to StarPU
jfonseca-aneo Aug 24, 2026
8860d40
build: pin vcpkg eigen3 overlay port to 3.4.1 to fix Windows CI confi…
jfonseca-aneo Aug 24, 2026
4bf4243
fix: cast enum args to int before formatting to fix Windows CI fmt/sp…
jfonseca-aneo Aug 24, 2026
2322586
fix: cast remaining Locations/Directions/StressFieldComponents enum a…
jfonseca-aneo Aug 24, 2026
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: 2 additions & 3 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: install dependencies
run : |
sudo apt-get install libboost-program-options-dev
sudo apt-get install libopenmpi-dev openmpi-common
sudo apt-get install libeigen3-dev
sudo apt-get install libspdlog-dev
sudo apt-get install flex bison

- name: bootstrap
run: . bootstrap.sh

- name: configure
run: mkdir build && cd build && cmake .. -DBUILD_TESTING=ON -DCOLLECT_STATS=ON -DSEWAS_DISTRIBUTED=ON -DSEWAS_WITH_PARSEC=ON -DVERBOSE=ON && cd -
run: mkdir build && cd build && cmake .. -DBUILD_TESTING=ON -DCOLLECT_STATS=ON -DSEWAS_DISTRIBUTED=ON -DSEWAS_WITH_STARPU=ON -DVERBOSE=ON && cd -
- name: build
run: cmake --build build --config Release

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: bootstrap
run: .\bootstrap.bat
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ doc/*
.vs/tasks.vs.json
/thirdparty/vcpkg/src
/thirdparty/vcpkg/build
/thirdparty/parsec/src
/thirdparty/parsec/build
/thirdparty/adios/src
/thirdparty/adios/build
/thirdparty/starpu/src
/thirdparty/starpu/build
/thirdparty/install
/out
/.vs/SeWaS/v16/.suo
/.vs/CMake Overview
Expand Down
73 changes: 73 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules" C

option(SEWAS_DISTRIBUTED "Build SeWaS for distributed memory platforms (default OFF)" OFF)
option(SEWAS_WITH_PARSEC "Use PaRSEC for task-scheduling (default OFF)" OFF)
option(SEWAS_WITH_STARPU "Use StarPU for task-scheduling (default OFF)" OFF)
option(VERBOSE "Enable collecting and displaying of traced events at runtime (default OFF)" OFF)
option(BUILD_TESTING "Build the testing tree (default OFF)" OFF)
option(COLLECT_STATS "Collect statistics during execution (default ON)" ON)
Expand Down Expand Up @@ -77,10 +78,17 @@ if (DOWNLOAD_MISSING_DEPS)
set(TARGET_PLATFORM "${HOST_ARCH}-${SYSTEM_NAME}")


# Ports pinned here to a version older than what the vcpkg commit above ships by
# default, because SEWAS' find_package() calls require compatibility with an older
# version than what is currently in the upstream port tree (e.g. eigen3 defaults to
# a 5.x release, which find_package(Eigen3 3.3.3) rejects as incompatible).
set(VCPKG_OVERLAY_PORTS_DIR ${CMAKE_SOURCE_DIR}/cmake/resources/vcpkg/overlay-ports)

# define helper macro for downloading packages through vpckg
macro(_vcpkg_install package)
message("[VCPKG] Installing package : ${package}:${TARGET_PLATFORM}")
execute_process(COMMAND ${VCPKG_EXE} install ${package}:${TARGET_PLATFORM}
--overlay-ports=${VCPKG_OVERLAY_PORTS_DIR}
RESULT_VARIABLE STATUS
WORKING_DIRECTORY ${VCPKG_ROOT})
if (STATUS)
Expand Down Expand Up @@ -122,6 +130,14 @@ if(SEWAS_WITH_PARSEC)
add_compile_options(-DSEWAS_WITH_PARSEC)
endif()

if(SEWAS_WITH_STARPU)
add_compile_options(-DSEWAS_WITH_STARPU)
endif()

if(SEWAS_WITH_PARSEC AND SEWAS_WITH_STARPU)
message(FATAL_ERROR "SEWAS_WITH_PARSEC and SEWAS_WITH_STARPU are mutually exclusive.")
endif()

if (VERBOSE)
add_compile_options(-DVERBOSE)
endif(VERBOSE)
Expand Down Expand Up @@ -354,6 +370,62 @@ if(SEWAS_WITH_PARSEC)
set(SEWAS_LIBRARIES ${SEWAS_LIBRARIES} ${PARSEC_LIBRARIES})
endif(SEWAS_WITH_PARSEC)

# -------------------------------------------------------------------
# StarPU
# -------------------------------------------------------------------
if(SEWAS_WITH_STARPU)
if (NOT SEWAS_DISTRIBUTED)
message(FATAL_ERROR "The distributed version of SeWaS relies on StarPU.")
endif(NOT SEWAS_DISTRIBUTED)

find_package(PkgConfig REQUIRED)
set(STARPU_PC_VERSION "1.4" CACHE STRING "StarPU pkg-config version suffix")

# Also look under the same install prefix vcpkg-downloaded/built dependencies
# (PaRSEC, ADIOS2, ...) land in, in case a previous DOWNLOAD_MISSING_DEPS run
# already built StarPU there.
set(ENV{PKG_CONFIG_PATH} "${THIRDPARTY_ROOT}/install/lib/pkgconfig:${THIRDPARTY_ROOT}/install/lib64/pkgconfig:$ENV{PKG_CONFIG_PATH}")
pkg_check_modules(STARPU starpumpi-${STARPU_PC_VERSION})

if (NOT STARPU_FOUND)
message(WARNING "StarPU not found")
if (DOWNLOAD_MISSING_DEPS)
# StarPU not found; trying to download and build it (autotools-based,
# see cmake/resources/starpu/CMakeLists.txt)
set(STARPU_DOWNLOAD_ROOT ${THIRDPARTY_ROOT}/starpu)
configure_file(${CMAKE_SOURCE_DIR}/cmake/resources/starpu/CMakeLists.txt ${STARPU_DOWNLOAD_ROOT}/build/starpu-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${STARPU_DOWNLOAD_ROOT}/build/starpu-download)
if(result)
message(FATAL_ERROR "CMake step for starpu failed: ${result}")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
WORKING_DIRECTORY ${STARPU_DOWNLOAD_ROOT}/build/starpu-download)
if(result)
message(FATAL_ERROR "Build step for starpu failed: ${result}")
endif()

pkg_check_modules(STARPU REQUIRED starpumpi-${STARPU_PC_VERSION})
else(DOWNLOAD_MISSING_DEPS)
message(FATAL_ERROR "StarPU (starpumpi-${STARPU_PC_VERSION}) not found via pkg-config. "
"Install it (e.g. 'apt install libstarpu-dev' on Debian/Ubuntu, or build it "
"via Spack) and make sure its .pc files are on PKG_CONFIG_PATH, or set "
"DOWNLOAD_MISSING_DEPS for enabling automatic download of missing dependencies")
endif(DOWNLOAD_MISSING_DEPS)
endif(NOT STARPU_FOUND)

message(STATUS "StarPU found")
message(STATUS " STARPU_INCLUDE_DIRS = ${STARPU_INCLUDE_DIRS}")
message(STATUS " STARPU_LIBRARY_DIRS = ${STARPU_LIBRARY_DIRS}")
message(STATUS " STARPU_LIBRARIES = ${STARPU_LIBRARIES}")

include_directories("${STARPU_INCLUDE_DIRS}")
link_directories("${STARPU_LIBRARY_DIRS}")
set(SEWAS_LIBRARIES ${SEWAS_LIBRARIES} ${STARPU_LIBRARIES})
endif(SEWAS_WITH_STARPU)

# -------------------------------------------------------------------
# Boost
# -------------------------------------------------------------------
Expand Down Expand Up @@ -445,6 +517,7 @@ set(SOURCES
src/SEWASParameterManager.cxx
src/SEWASSequential.cxx
src/SEWASPaRSEC.cxx
src/SEWASStarPU.cxx
src/Mesh3DPartitioning.cxx
src/VisualizationManager.cxx
src/MetricsManager.cxx
Expand Down
89 changes: 59 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,49 +279,78 @@ DisplayStress

Those visualization tasks interact with [VTK](http://www.vtk.org/) actors to render the scene.

# Building the application
The application has been tested on Debian 9 and CentOS. The following steps are suitable for a Debian-like OS. Our experiments were carried out using Intel compiler 18, but according to our recent experiments using gcc 7.3 there is no significant performance differences between these two compilers. So all the following experiments can be obtained using gcc.
# Building and installing

## Dependencies
+ Boost 1.62 (program-options module)
```sh
$ sudo apt-get install libboost-program-options-dev
```
SeWaS is a CMake project. Its dependencies (Boost `program_options`, Eigen3, spdlog, and — for
distributed builds — OpenMPI plus PaRSEC or StarPU, depending on which task-based scheduler is
selected) are resolved automatically at configure time through
[vcpkg](https://github.com/microsoft/vcpkg), vendored under `thirdparty/vcpkg`, so there is no dependency
installation step to perform by hand. It has been validated on Linux (Ubuntu/Debian-like, via CI) and
Windows; a C++17 compiler and CMake 3.10.3+ are required either way.

+ OpenMPI 2.0.2
```sh
$ sudo apt-get install libopenmpi-dev openmpi-common
```
## 1. System prerequisites

+ PaRSEC 2.0
```sh
$ git clone https://bitbucket.org/icldistcomp/parsec.git
$ cd parsec
$ cmake .. -DPARSEC_WITH_DEVEL_HEADERS=1 -DPARSEC_GPU_WITH_CUDA=0
$ make install
```
Only build tooling that vcpkg itself cannot provide needs to be present on the system beforehand:

+ Linux: a C++17 compiler (gcc/clang), CMake, and — only when building with `-DSEWAS_WITH_PARSEC=ON`,
since PaRSEC's JDF files are compiled with `parsec-ptgpp` — `flex` and `bison`. `-DSEWAS_WITH_STARPU=ON`
needs no extra tooling beyond that:
```sh
sudo apt-get install build-essential cmake flex bison
```
+ Windows: Visual Studio (with the C++ workload) and CMake.

## 2. Bootstrap

Run once per clone, before the first configure. This downloads and builds vcpkg into
`thirdparty/vcpkg` if it isn't already present:

+ Eigen 3.3.3
```sh
$ sudo apt-get install libeigen3-dev
./bootstrap.sh # Linux/macOS
bootstrap.bat # Windows
```

+ Intel TBB 4.3
## 3. Configure

```sh
$ sudo apt-get install libtbb-dev
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DSEWAS_DISTRIBUTED=ON -DSEWAS_WITH_STARPU=ON \
-DBUILD_TESTING=ON -DCOLLECT_STATS=ON -DVERBOSE=ON
```

## SeWaS build

`SEWAS_DISTRIBUTED` enables MPI-based distributed execution, and `SEWAS_WITH_STARPU`/`SEWAS_WITH_PARSEC`
(mutually exclusive, each requiring it) select the task-based scheduler. Linux CI builds
`SEWAS_DISTRIBUTED`+`SEWAS_WITH_STARPU`; Windows CI builds with both OFF. With `DOWNLOAD_MISSING_DEPS` on
(the default), CMake will download and build any of the above dependencies not already found on the
system — expect the first configure to take a while, since it also builds StarPU (or PaRSEC) from source.

Other build options (all defined at the top of `CMakeLists.txt` and OFF unless noted) let you tune what
gets compiled in:

| Option | Effect |
|---|---|
| `VISUALIZE_EXECUTION` (+ `ENABLE_VELOCITY_RENDERING`, `ENABLE_STRESS_RENDERING`, `ENABLE_CLUSTER_RENDERING`) | Real-time VTK rendering of the simulation |
| `ENABLE_IO` | ADIOS2-based output |
| `USE_BLOCKWISE_FDO` (ON), `VECTORIZE_COMPUTATIONS` (ON), `EIGEN_VECTORIZATION` (ON), `BOOST_SIMD_VECTORIZATION` | Control how the finite-difference operator is vectorized |
| `DOWNLOAD_MISSING_DEPS` (ON) | Auto-fetch missing dependencies through vcpkg instead of failing configure |

## 4. Build

```sh
$ export SEWAS_ROOT=/path/to/SeismicWaveSimulator
$ cd $SEWAS_ROOT/build
$ cmake ../src -DCMAKE_BUILD_TYPE=Release
$ make
cmake --build . --config Release
```

At this stage the `build/` directory should contain an executable `sewas`
This produces the `sewas` executable directly inside `build/` — there is no separate install step/prefix;
run it in place (see [User Interface](#user-interface) above) or copy the binary wherever you need it.

/!\ The results presented in our paper are obtained on a cluster of Intel KNL processors. Hence it is mandatory to build the SeWaS application natively on one co-processor for best performances.
## 5. Test (optional)

With `-DBUILD_TESTING=ON`, the GoogleTest suite can be run via CTest:

```sh
ctest -C Release --output-on-failure -V
```

# Benchmarks
Performance studies have been carried out using two test cases: TestA and TestB.
Expand Down
2 changes: 1 addition & 1 deletion cmake/resources/adios/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include(ExternalProject)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
ExternalProject_Add(adios
GIT_REPOSITORY https://github.com/ornladios/ADIOS2.git
GIT_TAG v2.5.0
GIT_TAG v2.12.1
SOURCE_DIR "${ADIOS_DOWNLOAD_ROOT}/src"
BINARY_DIR "${ADIOS_DOWNLOAD_ROOT}/build"
PATCH_COMMAND ""
Expand Down
2 changes: 1 addition & 1 deletion cmake/resources/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(googletest-download NONE)
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
GIT_TAG v1.17.0
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND ""
Expand Down
13 changes: 9 additions & 4 deletions cmake/resources/parsec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ project(parsec-download)
include(ExternalProject)

if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
# Pinned to the last commit before PaRSEC's "Reshape of datacopies" rework
# (8f813a179, first shipped in parsec-3.0.2012-rc1). That change and everything
# built on top of it, all the way through parsec-4.0.2411, breaks cross-rank
# halo exchange for SeWaS's task graph (MPI_ERR_TRUNCATE in the 2+ rank case;
# confirmed by bisection, root cause not yet identified upstream).
ExternalProject_Add(parsec
GIT_REPOSITORY https://bitbucket.org/icldistcomp/parsec.git
GIT_TAG 8f72a0ecab1296fc3d90ba7c164695f4a3738950
GIT_REPOSITORY https://github.com/icldisco/parsec
GIT_TAG 4659c27061ffe2c23b034e09becf7e44e54ef6d8
SOURCE_DIR "${PARSEC_DOWNLOAD_ROOT}/src"
BINARY_DIR "${PARSEC_DOWNLOAD_ROOT}/build"
PATCH_COMMAND cd ${PARSEC_DOWNLOAD_ROOT}/src && git apply ${PARSEC_DOWNLOAD_ROOT}/patches/increase_max_inout_deps.patch
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DBUILD_TESTING=OFF -DPARSEC_DIST_WITH_MPI=${SEWAS_DISTRIBUTED} -DPARSEC_WITH_DEVEL_HEADERS=ON -DCMAKE_INSTALL_PREFIX=${THIRDPARTY_ROOT}/install ${PARSEC_DOWNLOAD_ROOT}/src
PATCH_COMMAND cd ${PARSEC_DOWNLOAD_ROOT}/src && git apply ${PARSEC_DOWNLOAD_ROOT}/patches/increase_max_inout_deps.patch && sed -i "s/parsec_profiling_stream_t \\*new )/parsec_profiling_stream_t *new_stream )/" parsec/profiling.h
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DBUILD_TESTING=OFF -DPARSEC_DIST_WITH_MPI=${SEWAS_DISTRIBUTED} -DPARSEC_WITH_DEVEL_HEADERS=ON -DCMAKE_C_FLAGS=-fcommon -DCMAKE_INSTALL_PREFIX=${THIRDPARTY_ROOT}/install ${PARSEC_DOWNLOAD_ROOT}/src
BUILD_COMMAND make -j
INSTALL_COMMAND make install
TEST_COMMAND ""
Expand Down
31 changes: 31 additions & 0 deletions cmake/resources/starpu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.10.3)

project(starpu-download)

include(ExternalProject)

if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
# Release tarball (ships a pre-generated `configure`, so no autoreconf/automake/
# libtool is required at build time). Version/hash pinned to StarPU 1.4.7.
ExternalProject_Add(starpu
URL https://files.inria.fr/starpu/starpu-1.4.7/starpu-1.4.7.tar.gz
URL_HASH SHA256=1eb3df551089153fe6e0b172ad95118434b4a81ea9eaa5a2c38725d0db53b13e
SOURCE_DIR "${STARPU_DOWNLOAD_ROOT}/src"
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure
--prefix=${THIRDPARTY_ROOT}/install
--with-mpicc=${MPI_C_COMPILER}
--with-mpicxx=${MPI_CXX_COMPILER}
--disable-build-tests
--disable-build-examples
--disable-build-doc
--disable-fortran
--disable-cuda
--disable-opencl
BUILD_COMMAND make -j
INSTALL_COMMAND make install
TEST_COMMAND ""
)
else()
message(FATAL_ERROR "StarPU based version of SeWaS is not yet available on this system: ${CMAKE_SYSTEM_NAME}")
endif()
9 changes: 6 additions & 3 deletions cmake/resources/vcpkg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
ExternalProject_Add(vcpkg
GIT_REPOSITORY https://github.com/microsoft/vcpkg.git
GIT_TAG 941d5464544eb5812b2cbd6e687c3ebc78ed2624
GIT_TAG 40f3c709db80acf154ac4b17a1f83c564ebd022e
SOURCE_DIR "../src"
BUILD_IN_SOURCE true
CONFIGURE_COMMAND ""
Expand All @@ -20,13 +20,16 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
TEST_COMMAND ""
)
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
# arm64-linux support is native to vcpkg since well before this pin; the old
# add_aarch64_support.patch/community triplet copy is both unneeded and no
# longer applies (scripts/buildsystems/vcpkg.cmake has since been rewritten
# upstream).
ExternalProject_Add(vcpkg
GIT_REPOSITORY https://github.com/microsoft/vcpkg.git
GIT_TAG 941d5464544eb5812b2cbd6e687c3ebc78ed2624
GIT_TAG 40f3c709db80acf154ac4b17a1f83c564ebd022e
SOURCE_DIR "../src"
BUILD_IN_SOURCE true
CONFIGURE_COMMAND ""
PATCH_COMMAND cp ../triplets/arm64-linux.cmake ../src/triplets/community && cd ../src && git apply ../patches/add_aarch64_support.patch
BUILD_COMMAND ./bootstrap-vcpkg.sh ${_VCPKG_BOOTSTRAP_OPTIONS}
INSTALL_COMMAND ""
TEST_COMMAND ""
Expand Down
Loading
Loading