Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/CI/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi
-DBUILD_SHARED_LIBS=$SHARED_TYPE
-DPARSEC_PROF_TRACE=$PROFILING
-DMPIEXEC_PREFLAGS='--bind-to;none;--oversubscribe'
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_INSTALL_PREFIX=$PARSEC_INSTALL_DIR
-DPARSEC_GPU_WITH_CUDA=$CUDA
-DPARSEC_GPU_WITH_HIP=$HIP
EOF
Expand Down
40 changes: 40 additions & 0 deletions .github/dplasma/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: DPLASMA
description: Uses the DPLASMA CI as a tester for PaRSEC

# Environment variables required:
# BUILD_TYPE: ${{matrix.build_type}}
# SHARED_TYPE: ${{matrix.shared_type}}
# DEVICE: ${{matrix.device}}
# PARSEC_INSTALL_DIR:
# INSTALL_DIRECTORY: ${{github.workspace}}/dplasma/install
# SETUP: ${{github.workspace}}/dplasma/.github/workflows/env_setup.sh

runs:
using: "composite"
steps:
- name: Build and Install DPLASMA
shell: bash
run: |
export INSTALL_DIRECTORY=$PWD/dplasma/install
git clone https://github.com/ICLDisco/dplasma
sed -i s/MPIEXEC_NUMPROC_FLAGS/MPIEXEC_NUMPROC_FLAG/ dplasma/CMakeLists.txt
source dplasma/.github/workflows/env_setup.sh
mkdir dplasma/build
cd dplasma/build
CC=gcc CXX=g++ FC=gfortran cmake $BUILD_CONFIG -DPaRSEC_ROOT=$PARSEC_INSTALL_DIR ..
cmake --build .
cmake --build . --target install

- name: Test
working-directory: dplasma/build
shell: bash
run: |
source ../.github/workflows/env_setup.sh
ctest --output-on-failure

- name: Save Artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: CMake-error-log
path: dplasma/build/CMakeFiles/CMakeError.log
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ jobs:
fail-fast: false
matrix:
build_type : [ Debug, Release ]
shared_type : [ OFF, ON ]
profiling : [ OFF, ON ]
shared_type : [ ON, OFF ]
profiling : [ ON, OFF ]
device: [ cpu, gpu_nvidia, gpu_amd ]
exclude:
- build_type: Debug
profiling: OFF
- build_type: Release
shared_type: OFF
name: "${{matrix.build_type}} Shared=${{matrix.shared_type}} Profile=${{matrix.profiling}} ${{matrix.device}}"
name: "PaRSEC ${{matrix.build_type}} Shared=${{matrix.shared_type}} Profile=${{matrix.profiling}} ${{matrix.device}}"
runs-on: [ "${{matrix.device}}", self-hosted ]
env:
BUILD_TYPE: ${{matrix.build_type}}
SHARED_TYPE: ${{matrix.shared_type}}
PROFILING: ${{matrix.profiling}}
DEVICE: ${{matrix.device}}
PARSEC_INSTALL_DIR: ${{github.workspace}}/install
SETUP: ${{github.workspace}}/.github/CI/env_setup.sh
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -76,3 +77,6 @@ jobs:
with:
name: CMake-error-log
path: CMakeFiles/CMakeError.log

- name: Test with DPLASMA
uses: ./.github/dplasma
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -736,14 +736,14 @@ int main(int argc, char *argv[]) {
endif( PARSEC_GPU_WITH_CUDA )

if( PARSEC_GPU_WITH_HIP )
# This is kinda ugly but the PATH and HINTS don't get transmitted to sub-dependents
set(CMAKE_SYSTEM_PREFIX_PATH_save ${CMAKE_SYSTEM_PREFIX_PATH})
list(APPEND CMAKE_SYSTEM_PREFIX_PATH /opt/rocm)
if( NOT DEFINED ROCM_ROOT_DIR AND IS_DIRECTORY /opt/rocm )
set(ROCM_ROOT_DIR /opt/rocm)
endif()
list(APPEND CMAKE_PREFIX_PATH ${ROCM_ROOT_DIR}/hip ${ROCM_ROOT_DIR})
find_package(HIP QUIET) #quiet because hip-config.cmake is not part of core-cmake and will spam a loud warning when hip/rocm is not installed
if(HIP_FOUND AND HIP_VERSION VERSION_LESS 5) # find_package(HIP 5...6) does not work for some reason
message(FATAL_ERROR "Found HIP version ${HIP_VERSION} in ${HIP_LIB_INSTALL_DIR} is too old, use HIP_ROOT to select another version")
endif()
set(CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SYSTEM_PREFIX_PATH_save})
if(HIP_FOUND AND PARSEC_HAVE_CUDA)
# the underlying reason is that the generated ptg code cannot include at the same time
# cuda_runtime.h and hip_runtime.h, so we need to modify the dev_cuda.h to not expose any
Expand Down
1 change: 1 addition & 0 deletions cmake_modules/PaRSECConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ endif(@PARSEC_HAVE_CUDA@)

if(@PARSEC_HAVE_HIP@)
enable_language(CXX)
list (APPEND CMAKE_PREFIX_PATH @ROCM_ROOT_DIR@/hip @ROCM_ROOT_DIR@)
find_package(HIP REQUIRED)
set(PARSEC_HAVE_HIP TRUE)
endif(@PARSEC_HAVE_HIP@)
Expand Down
5 changes: 4 additions & 1 deletion parsec/data_dist/matrix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ if( TARGET parsec-ptgpp )
target_ptg_sources(parsec PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/reduce_col.jdf;${CMAKE_CURRENT_SOURCE_DIR}/reduce_row.jdf;${CMAKE_CURRENT_SOURCE_DIR}/reduce.jdf;${CMAKE_CURRENT_SOURCE_DIR}/diag_band_to_rect.jdf;${CMAKE_CURRENT_SOURCE_DIR}/apply.jdf")
set_property(TARGET parsec
APPEND PROPERTY
PRIVATE_HEADER_H data_dist/matrix/diag_band_to_rect.h)
PRIVATE_HEADER_H
data_dist/matrix/diag_band_to_rect.h
data_dist/matrix/apply.h
)
endif( TARGET parsec-ptgpp )

target_sources(parsec PRIVATE ${sources})
Expand Down
Loading