-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sync spack recipes from spack@develop * ci on gh200 * remove handwritten compilers.yaml
- Loading branch information
1 parent
09fc581
commit 7e2df12
Showing
6 changed files
with
237 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
include: | ||
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml' | ||
|
||
stages: | ||
- baseimage | ||
- build | ||
- test | ||
|
||
build base image: | ||
extends: [.dynamic-image-name, .container-builder-cscs-gh200] | ||
stage: baseimage | ||
timeout: 2h | ||
variables: | ||
SLURM_RESERVATION: 'NCCL' | ||
DOCKERFILE: ci/baseimage.cuda.Dockerfile | ||
WATCH_FILECHANGES: ci/baseimage.cuda.Dockerfile | ||
PERSIST_IMAGE_NAME: $CSCS_REGISTRY_PATH/base/cosma-ci | ||
|
||
build tiled-mm: | ||
extends: .container-builder-cscs-gh200 | ||
needs: ["build base image"] | ||
stage: build | ||
variables: | ||
SLURM_RESERVATION: 'NCCL' | ||
DOCKERFILE: ci/build.Dockerfile | ||
PERSIST_IMAGE_NAME: $CSCS_REGISTRY_PATH/cosma/cosma-ci:$CI_COMMIT_SHA | ||
ENVPATH: "/cosma-env-cuda" | ||
DOCKER_BUILD_ARGS: '["BASE_IMAGE=${BASE_IMAGE}", "ENVPATH=$ENVPATH"]' | ||
|
||
.run_tests: | ||
extends: [.container-runner-todi-gh200] | ||
needs: ["build tiled-mm"] | ||
stage: test | ||
image: $CSCS_REGISTRY_PATH/cosma/cosma-ci:$CI_COMMIT_SHA | ||
variables: | ||
GIT_STRATEGY: none | ||
MPICH_MAX_THREAD_SAFETY: multiple | ||
CSCS_REGISTRY_LOGIN: 'YES' | ||
PULL_IMAGE: 'YES' | ||
SLURM_HINT: nomultithread | ||
SLURM_UNBUFFEREDIO: '' | ||
SLURM_RESERVATION: 'NCCL' | ||
SLURM_CPU_BIND: 'socket' | ||
SLURM_MPI: "pmi2" | ||
CRAY_CUDA_MPS: 'YES' | ||
# Workaround after update until hooks are fixed | ||
ENROOT_LIBRARY_PATH: /capstor/scratch/cscs/fmohamed/enrootlibn | ||
# SLURM_WAIT: 0 | ||
COSMA_GPU_MAX_TILE_K: 100 | ||
COSMA_GPU_MAX_TILE_M: 100 | ||
COSMA_GPU_MAX_TILE_N: 100 | ||
|
||
mapper: | ||
extends: .run_tests | ||
stage: test | ||
script: /cosma-env-cuda/.spack-env/view/bin/test.mapper | ||
variables: | ||
SLURM_JOB_NUM_NODES: 1 | ||
SLURM_NTASKS: 1 | ||
USE_MPI: 'YES' | ||
|
||
pdgemm: | ||
extends: .run_tests | ||
stage: test | ||
script: /cosma-env-cuda/.spack-env/view/bin/test.pdgemm | ||
variables: | ||
SLURM_JOB_NUM_NODES: 2 | ||
SLURM_NTASKS: 16 | ||
USE_MPI: 'YES' | ||
|
||
multiply: | ||
extends: .run_tests | ||
stage: test | ||
script: /cosma-env-cuda/.spack-env/view/bin/test.multiply | ||
variables: | ||
SLURM_JOB_NUM_NODES: 2 | ||
SLURM_NTASKS: 16 | ||
USE_MPI: 'YES' | ||
|
||
scalar_matmul: | ||
extends: .run_tests | ||
stage: test | ||
script: /cosma-env-cuda/.spack-env/view/bin/test.scalar_matmul | ||
variables: | ||
SLURM_JOB_NUM_NODES: 1 | ||
SLURM_NTASKS: 8 | ||
USE_MPI: 'YES' | ||
|
||
multiply_using_layout: | ||
extends: .run_tests | ||
stage: test | ||
script: /cosma-env-cuda/.spack-env/view/bin/test.multiply_using_layout | ||
variables: | ||
SLURM_JOB_NUM_NODES: 1 | ||
SLURM_NTASKS: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
# Example mps-wrapper.sh usage: | ||
# > srun --cpu-bind=socket [...] mps-wrapper.sh <cmd> | ||
|
||
export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps | ||
export CUDA_MPS_LOG_DIRECTORY=/tmp/nvidia-log | ||
# Launch MPS from a single rank per node | ||
if [ $SLURM_LOCALID -eq 0 ]; then | ||
CUDA_VISIBLE_DEVICES=0,1,2,3 nvidia-cuda-mps-control -d | ||
fi | ||
|
||
# set cuda device | ||
numa_nodes=$(hwloc-calc --physical --intersect NUMAnode $(taskset -p $$ | awk '{print "0x"$6}')) | ||
export CUDA_VISIBLE_DEVICES=$numa_nodes | ||
# Run the command | ||
exec numactl --membind=$numa_nodes "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1fd1e55..41a041b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -19,7 +19,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS "YES") # always write compile_commands.json | ||
|
||
set(COSMA_GPU_BACKENDS_LIST "CUDA" "ROCM") | ||
set(COSMA_SCALAPACK_LIST "OFF" "MKL" "CRAY_LIBSCI" "CUSTOM") | ||
-set(COSMA_BLAS_LIST "auto" "MKL" "OPENBLAS" "CRAY_LIBSCI" "CUSTOM" "BLIS" "ATLAS" "CUDA" "ROCM" "OFF") | ||
+set(COSMA_BLAS_LIST "auto" "MKL" "SSL2" "OPENBLAS" "CRAY_LIBSCI" "CUSTOM" "BLIS" "ATLAS" "CUDA" "ROCM" "OFF") | ||
option(COSMA_WITH_TESTS "Generate the test target." ON) | ||
option(COSMA_WITH_APPS "Generate the miniapp targets." ON) | ||
option(COSMA_WITH_BENCHMARKS "Generate the benchmark targets." ON) | ||
@@ -45,7 +45,7 @@ if (COSMA_BLAS MATCHES "CUDA|ROCM") | ||
set(COSMA_GPU_BACKEND ${COSMA_BLAS}) | ||
else() | ||
if(COSMA_BLAS STREQUAL "OFF") | ||
- message(FATAL_ERROR "A Blas implementation is needed when running on CPU only: choices are : auto, MKL, OPENBLAS, CRAY_LIBSCI, CUSTOM, BLIS, ATLAS, FLEXIBLAS, ARMPL, GenericBLAS") | ||
+ message(FATAL_ERROR "A Blas implementation is needed when running on CPU only: choices are : auto, MKL, SSL2, OPENBLAS, CRAY_LIBSCI, CUSTOM, BLIS, ATLAS, FLEXIBLAS, ARMPL, GenericBLAS") | ||
else() | ||
set(COSMA_BLAS_VENDOR ${COSMA_BLAS}) | ||
endif() | ||
@@ -190,6 +190,7 @@ install(FILES "${cosma_BINARY_DIR}/cosmaConfig.cmake" | ||
"${cosma_BINARY_DIR}/cosmaConfigVersion.cmake" | ||
"${cosma_BINARY_DIR}/cosmaConfigVersion.cmake" | ||
"${cosma_SOURCE_DIR}/cmake/FindMKL.cmake" | ||
+ "${cosma_SOURCE_DIR}/cmake/FindSSL2.cmake" | ||
"${cosma_SOURCE_DIR}/cmake/FindBlas.cmake" | ||
"${cosma_SOURCE_DIR}/cmake/FindSCALAPACK.cmake" | ||
"${cosma_SOURCE_DIR}/cmake/FindOPENBLAS.cmake" | ||
diff --git a/cmake/FindBlas.cmake b/cmake/FindBlas.cmake | ||
index aef956c..3c47561 100644 | ||
--- a/cmake/FindBlas.cmake | ||
+++ b/cmake/FindBlas.cmake | ||
@@ -14,6 +14,7 @@ endif() | ||
set(COSMA_BLAS_VENDOR_LIST | ||
"auto" | ||
"MKL" | ||
+ "SSL2" | ||
"OPENBLAS" | ||
"FLEXIBLAS" | ||
"ARMPL" | ||
diff --git a/cmake/FindSSL2.cmake b/cmake/FindSSL2.cmake | ||
new file mode 100644 | ||
index 0000000..f0e11bf | ||
--- /dev/null | ||
+++ b/cmake/FindSSL2.cmake | ||
@@ -0,0 +1,56 @@ | ||
+#.rst: | ||
+# FindSSL2 | ||
+# ----------- | ||
+# | ||
+# This module tries to find the SSL2 library. | ||
+# | ||
+# The following variables are set | ||
+# | ||
+# :: | ||
+# | ||
+# SSL2_FOUND - True if ssl2 is found | ||
+# SSL2_LIBRARIES - The required libraries | ||
+# SSL2_INCLUDE_DIRS - The required include directory | ||
+# | ||
+# The following import target is created | ||
+# | ||
+# :: | ||
+# | ||
+# SSL2::ssl2 | ||
+ | ||
+#set paths to look for library from ROOT variables.If new policy is set, find_library() automatically uses them. | ||
+# if(NOT POLICY CMP0074) | ||
+set(_SSL2_PATHS ${SSL2_ROOT} | ||
+ $ENV{SSL2_ROOT} | ||
+ $ENV{SSL2ROOT} | ||
+ $ENV{SSL2_DIR} | ||
+ $ENV{SSL2DIR}) | ||
+# endif() | ||
+ | ||
+find_library( | ||
+ COSMA_SSL2_LINK_LIBRARIES | ||
+ NAMES "fjlapackex" | ||
+ HINTS ${_SSL2_PATHS} | ||
+ PATH_SUFFIXES "lib64" | ||
+) | ||
+find_path( | ||
+ COSMA_SSL2_INCLUDE_DIRS | ||
+ NAMES "cblas.h" | ||
+ HINTS ${_SSL2_PATHS} | ||
+ PATH_SUFFIXES "include" | ||
+) | ||
+ | ||
+# check if found | ||
+include(FindPackageHandleStandardArgs) | ||
+find_package_handle_standard_args(SSL2 REQUIRED_VARS COSMA_SSL2_INCLUDE_DIRS COSMA_SSL2_LINK_LIBRARIES) | ||
+ | ||
+# add target to link against | ||
+if(NOT TARGET cosma::BLAS::SSL2::ssl2) | ||
+ add_library(cosma::BLAS::SSL2::ssl2 INTERFACE IMPORTED) | ||
+ add_library(cosma::BLAS::SSL2::blas ALIAS cosma::BLAS::SSL2::ssl2) | ||
+endif() | ||
+set_property(TARGET cosma::BLAS::SSL2::ssl2 PROPERTY INTERFACE_LINK_LIBRARIES ${COSMA_SSL2_LINK_LIBRARIES}) | ||
+set_property(TARGET cosma::BLAS::SSL2::ssl2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${COSMA_SSL2_INCLUDE_DIRS}) | ||
+ | ||
+# prevent clutter in cache | ||
+MARK_AS_ADVANCED(SSL2_FOUND SSL2_LIBRARIES SSL2_INCLUDE_DIRS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters