From ea51f32eb8f46b8da91d31b57801aca58d73498f Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Tue, 21 Nov 2023 08:29:57 +0100 Subject: [PATCH 1/5] Update project version to 0.3.3 and add path to slurm header file --- CMakeLists.txt | 2 +- cmake/FindSlurm.cmake | 2 ++ spack/packages/scord/package.py | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a11f4c..f46b193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.19) project( scord - VERSION 0.3.1 + VERSION 0.3.3 LANGUAGES C CXX ) diff --git a/cmake/FindSlurm.cmake b/cmake/FindSlurm.cmake index 4a17249..7cf92d4 100644 --- a/cmake/FindSlurm.cmake +++ b/cmake/FindSlurm.cmake @@ -72,6 +72,7 @@ The following cache variables may also be set: find_path( SLURM_INCLUDE_DIR NAMES slurm/slurm.h + ../slurm/slurm.h PATHS ENV SLURM ENV SLURM_PATH @@ -83,6 +84,7 @@ find_path( ) find_library(SLURM_LIBRARY NAMES slurm +../slurm PATHS ENV SLURM ENV SLURM_PATH diff --git a/spack/packages/scord/package.py b/spack/packages/scord/package.py index c9a95b4..f75f702 100644 --- a/spack/packages/scord/package.py +++ b/spack/packages/scord/package.py @@ -92,10 +92,6 @@ class Scord(CMakePackage): depends_on("cargo@0.3.2:", when='@0.3.1:') depends_on("slurm", when='@0.3.1:') -# slurm: -# externals: -# - spec: "slurm@23.02.6" -# prefix: "opt/slurm-23.02.6/" with when("@0.2.0: +ofi"): depends_on("libfabric@1.14.0 fabrics=sockets,tcp,rxm") -- GitLab From 674dc7867ff0453482a33e95972a4b66e84f7af4 Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Tue, 21 Nov 2023 08:41:26 +0100 Subject: [PATCH 2/5] Refactor FindSlurm.cmake to improve SLURM library and include directory detection --- cmake/FindSlurm.cmake | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/cmake/FindSlurm.cmake b/cmake/FindSlurm.cmake index 7cf92d4..8699ab2 100644 --- a/cmake/FindSlurm.cmake +++ b/cmake/FindSlurm.cmake @@ -72,30 +72,18 @@ The following cache variables may also be set: find_path( SLURM_INCLUDE_DIR NAMES slurm/slurm.h - ../slurm/slurm.h - PATHS - ENV SLURM - ENV SLURM_PATH + PATHS ENV SLURM_ROOT - ENV CPATH - ENV C_INCLUDE_PATH - ENV CPLUS_INCLUDE_PATH PATH_SUFFIXES include ) find_library(SLURM_LIBRARY NAMES slurm -../slurm -PATHS - ENV SLURM - ENV SLURM_PATH - ENV SLURM_ROOT - ENV LD_LIBRARY_PATH - ENV LIBRARY_PATH - ENV PATH + +PATHS + ENV SLURM_ROOT PATH_SUFFIXES "lib" "lib64" - ) mark_as_advanced(SLURM_INCLUDE_DIR SLURM_LIBRARY) -- GitLab From a668e9939dd6e3184327df6aa25a70dfdb949d8e Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Tue, 21 Nov 2023 08:51:07 +0100 Subject: [PATCH 3/5] Add SLURM_ROOT and LD_LIBRARY_PATH to find_library paths --- cmake/FindSlurm.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/FindSlurm.cmake b/cmake/FindSlurm.cmake index 8699ab2..b1ad3a6 100644 --- a/cmake/FindSlurm.cmake +++ b/cmake/FindSlurm.cmake @@ -81,6 +81,7 @@ find_library(SLURM_LIBRARY NAMES slurm PATHS ENV SLURM_ROOT + ENV LD_LIBRARY_PATH PATH_SUFFIXES "lib" "lib64" -- GitLab From 1c9f41df6ed98fb43e240c3ccf5c5ad10fdca784 Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Tue, 21 Nov 2023 09:15:41 +0100 Subject: [PATCH 4/5] Add PkgConfig and pkg_check_modules for Slurm --- cmake/FindSlurm.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/FindSlurm.cmake b/cmake/FindSlurm.cmake index b1ad3a6..25b1dd4 100644 --- a/cmake/FindSlurm.cmake +++ b/cmake/FindSlurm.cmake @@ -68,6 +68,8 @@ The following cache variables may also be set: The path to the Slurm library. #]=======================================================================] +find_package(PkgConfig) +pkg_check_modules(PC_SLURM QUIET SLURM) find_path( SLURM_INCLUDE_DIR -- GitLab From f021f2da3aaf83b9993b3324249dd31047b45422 Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Tue, 21 Nov 2023 11:55:49 +0100 Subject: [PATCH 5/5] Add /opt/slurm to search paths for FindSlurm.cmake --- cmake/FindSlurm.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/FindSlurm.cmake b/cmake/FindSlurm.cmake index 25b1dd4..a46ff08 100644 --- a/cmake/FindSlurm.cmake +++ b/cmake/FindSlurm.cmake @@ -76,6 +76,7 @@ find_path( NAMES slurm/slurm.h PATHS ENV SLURM_ROOT + "/opt/slurm" PATH_SUFFIXES include ) @@ -84,6 +85,7 @@ find_library(SLURM_LIBRARY NAMES slurm PATHS ENV SLURM_ROOT ENV LD_LIBRARY_PATH + "/opt/slurm" PATH_SUFFIXES "lib" "lib64" -- GitLab