forked from rarias/jungle
Compare commits
31 Commits
enableStri
...
enableStri
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c6f2e0097 | |||
| 61ed93c951 | |||
| 7d02658e44 | |||
| 06aa1fc5d4 | |||
|
1178574891
|
|||
|
5a4e9ae48a
|
|||
|
15ebb94645
|
|||
|
ada96f349c
|
|||
|
1427e357f5
|
|||
|
435699357d
|
|||
|
a238824ff1
|
|||
|
de6124f8ca
|
|||
| dda6a66782 | |||
| 22420e6ac8 | |||
| a71cd78b4c | |||
| e84a2cadbb | |||
| d3e43eb651 | |||
| a491546ffb | |||
| 933c78a80b | |||
| 150969be9b | |||
| 9097729759 | |||
| 779449f1db | |||
| 6cbe33bd80 | |||
| 3f1f5ae8f2 | |||
| fe8586e780 | |||
| 8677adba27 | |||
| f614149edf | |||
| 859eebda98 | |||
| c2a201b085 | |||
| f921f0a4bd | |||
| aa16bfc0bc |
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764522689,
|
||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||
"lastModified": 1767634882,
|
||||
"narHash": "sha256-2GffSfQxe3sedHzK+sTKlYo/NTIAGzbFCIsNMUPAAnk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||
"rev": "3c9db02515ef1d9b6b709fc60ba9a540957f661c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -57,6 +57,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 5;
|
||||
bantime-increment = {
|
||||
enable = true; # Double ban time on each attack
|
||||
maxtime = "7d"; # Ban up to a week
|
||||
};
|
||||
};
|
||||
|
||||
# Disable SSH login with password, allow only keypair
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
|
||||
networking.firewall = {
|
||||
extraCommands = ''
|
||||
# Blackhole BSC vulnerability scanner (OpenVAS) as it is spamming our
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
address = "10.0.40.40";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
interfaces.ibp5s0.ipv4.addresses = [ {
|
||||
interfaces.ibs785.ipv4.addresses = [ {
|
||||
address = "10.0.42.40";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKGt0ESYxekBiHJQowmKpfdouw0hVm3N7tUMtAaeLejK vincent@varch"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
pmartin1 = {
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# add the perf tool
|
||||
environment.systemPackages = with pkgs; [
|
||||
config.boot.kernelPackages.perf
|
||||
];
|
||||
|
||||
# allow non-root users to read tracing data from the kernel
|
||||
boot.kernel.sysctl."kernel.perf_event_paranoid" = -2;
|
||||
boot.kernel.sysctl."kernel.kptr_restrict" = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
address = "10.0.40.7";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
interfaces.ibp5s0.ipv4.addresses = [ {
|
||||
interfaces.ibs785.ipv4.addresses = [ {
|
||||
address = "10.0.42.7";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
address = "10.0.40.42";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
interfaces.ibp5s0.ipv4.addresses = [ {
|
||||
interfaces.ibs785.ipv4.addresses = [ {
|
||||
address = "10.0.42.42";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
address = "10.0.40.1";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
interfaces.ibp5s0.ipv4.addresses = [ {
|
||||
interfaces.ibs785.ipv4.addresses = [ {
|
||||
address = "10.0.42.1";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
# Watch out! The OmniPath device is not in the same place here:
|
||||
interfaces.ibp129s0.ipv4.addresses = [ {
|
||||
interfaces.ibs801.ipv4.addresses = [ {
|
||||
address = "10.0.42.2";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
|
||||
@@ -27,4 +27,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Allow gitea user to send mail
|
||||
users.users.gitea.extraGroups = [ "mail-robot" ];
|
||||
}
|
||||
|
||||
14
overlay.nix
14
overlay.nix
@@ -12,9 +12,9 @@ let
|
||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nanos6; };
|
||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
||||
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { useNanos6 = true; };
|
||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { useNodes = true; useOpenmp = true; };
|
||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { useNodes = true; useOpenmpV = true; };
|
||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||
@@ -56,10 +56,10 @@ let
|
||||
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
||||
slurm = import ./pkgs/slurm/default.nix { slurm = prev.slurm; };
|
||||
sonar = callPackage ./pkgs/sonar/default.nix { };
|
||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.buildPackages.clangOmpss2; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.buildPackages.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.buildPackages.clangOmpss2Nodes; allowedRequisites = null; };
|
||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.buildPackages.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
llvmPackages_latest
|
||||
stdenv
|
||||
, llvmPackages_latest
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, bash
|
||||
, python3
|
||||
, perl
|
||||
, which
|
||||
@@ -11,7 +11,6 @@
|
||||
, libffi
|
||||
, zlib
|
||||
, pkg-config
|
||||
, gcc # needed to set the rpath of libstdc++ for clang-tblgen
|
||||
, enableDebug ? false
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/llvm-ompss/llvm-mono.git"
|
||||
@@ -20,7 +19,10 @@
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv = llvmPackages_latest.stdenv;
|
||||
llvmPackages = llvmPackages_latest;
|
||||
llvmStdenv = llvmPackages.stdenv;
|
||||
# needed to set the rpath of libstdc++ for clang-tblgen
|
||||
gcc = stdenv.cc;
|
||||
|
||||
release = rec {
|
||||
version = "2025.11";
|
||||
@@ -43,7 +45,7 @@ let
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
in llvmStdenv.mkDerivation {
|
||||
pname = "clang-ompss2";
|
||||
inherit (source) src version;
|
||||
|
||||
@@ -61,13 +63,12 @@ in stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
bash
|
||||
cmake
|
||||
elfutils
|
||||
llvmPackages_latest.lld
|
||||
llvmPackages.lld
|
||||
perl
|
||||
pkg-config
|
||||
python3
|
||||
perl
|
||||
which
|
||||
zlib
|
||||
];
|
||||
@@ -98,8 +99,13 @@ in stdenv.mkDerivation {
|
||||
cd build
|
||||
cmakeDir="../llvm"
|
||||
cmakeFlagsArray=(
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.targetPlatform.config}"
|
||||
"-DLLVM_HOST_TRIPLE=${llvmStdenv.targetPlatform.config}"
|
||||
'' + (if "${llvmStdenv.targetPlatform.config}" == "riscv64-unknown-linux-gnu" then ''
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-linux-gnu"
|
||||
"-DLLVM_TARGETS_TO_BUILD=RISCV"
|
||||
'' else ''
|
||||
"-DLLVM_TARGETS_TO_BUILD=host"
|
||||
'') + ''
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON"
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||
# Required to run clang-ast-dump and clang-tblgen during build
|
||||
@@ -108,7 +114,8 @@ in stdenv.mkDerivation {
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
|
||||
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,--gdb-index"
|
||||
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld"
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;lld"
|
||||
"-DLLVM_ENABLE_RUNTIMES=compiler-rt"
|
||||
"-DLLVM_ENABLE_ASSERTIONS=ON"
|
||||
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
|
||||
@@ -3,25 +3,42 @@
|
||||
, lib
|
||||
, gcc
|
||||
, clangOmpss2Unwrapped
|
||||
, openmp ? null
|
||||
|
||||
, openmp
|
||||
, useOpenmp ? false
|
||||
, openmpv
|
||||
, useOpenmpV ? false
|
||||
, nanos6
|
||||
, useNanos6 ? false
|
||||
, nodes
|
||||
, useNodes ? false
|
||||
|
||||
, wrapCCWith
|
||||
, llvmPackages_latest
|
||||
, ompss2rt ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
usingNodesAndOmpv = (openmp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
||||
sameNosv = openmp.nosv == ompss2rt.nosv;
|
||||
getSplice = target: pkg: if pkg ? "__spliced" && pkg.__spliced ? target then pkg.__spliced."${target}" else pkg;
|
||||
getSpliceTargetTarget = getSplice "targetTarget";
|
||||
omp = if useOpenmp then openmp else if useOpenmpV then openmpv else null;
|
||||
ompss2rtUnspliced = if useNanos6 then nanos6 else if useNodes then nodes else null;
|
||||
ompss2rt = getSpliceTargetTarget ompss2rtUnspliced;
|
||||
usingNodesAndOmpv = omp != null && ompss2rt != null && (omp.pname == "openmp-v" && ompss2rt.pname == "nodes");
|
||||
sameNosvUnspliced = omp != null && ompss2rtUnspliced != null && omp.nosv == ompss2rtUnspliced.nosv;
|
||||
sameNosvSpliced = (getSpliceTargetTarget omp.nosv) == ompss2rt.nosv;
|
||||
in
|
||||
|
||||
assert assertMsg (usingNodesAndOmpv -> sameNosv) "OpenMP-V and NODES must share the same nOS-V";
|
||||
assert assertMsg (usingNodesAndOmpv -> sameNosvUnspliced) "OpenMP-V and NODES must share the same nOS-V before splice";
|
||||
assert assertMsg (usingNodesAndOmpv -> sameNosvSpliced) "OpenMP-V and NODES must share the same nOS-V after splice";
|
||||
assert assertMsg (useOpenmp -> !useOpenmpV) "Either OpenMP or OpenMP-V may be enabled, but not both";
|
||||
assert assertMsg (useNanos6 -> !useNodes) "Either Nanos6 or NODES may be enabled, but not both";
|
||||
|
||||
let
|
||||
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
||||
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
||||
ompname = if openmp.pname == "openmp-v" then "libompv" else "libomp";
|
||||
ompname = if omp.pname == "openmp-v" then "libompv" else "libomp";
|
||||
|
||||
|
||||
# We need to replace the lld linker from bintools with our linker just built,
|
||||
@@ -37,10 +54,10 @@ let
|
||||
inherit gcc;
|
||||
cc = clangOmpss2Unwrapped;
|
||||
gccVersion = with versions; let v = gcc.version; in concatStringsSep "." [(major v) (minor v) (patch v)];
|
||||
in wrapCCWith {
|
||||
in (wrapCCWith {
|
||||
inherit cc bintools;
|
||||
# extraPackages adds packages to depsTargetTargetPropagated
|
||||
extraPackages = optional (openmp != null) openmp;
|
||||
extraPackages = optional (omp != null) omp;
|
||||
extraBuildCommands = ''
|
||||
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gccVersion}" >> $out/nix-support/cc-cflags
|
||||
@@ -56,15 +73,15 @@ in wrapCCWith {
|
||||
|
||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||
|
||||
wrap clang++ $wrapper $ccPath/clang++
|
||||
wrap ${targetConfig}clang++ $wrapper $ccPath/clang++
|
||||
wrap ${targetConfig}clang $wrapper $ccPath/clang
|
||||
|
||||
'' + optionalString (openmp != null) ''
|
||||
'' + optionalString (omp != null) ''
|
||||
echo "export OPENMP_RUNTIME=${ompname}" >> $out/nix-support/cc-wrapper-hook
|
||||
'' + optionalString (ompss2rt != null) ''
|
||||
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
||||
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||
'' + optionalString (ompss2rt != null && ompss2rt.pname == "nodes") ''
|
||||
echo "export NOSV_HOME=${ompss2rt.nosv}" >> $out/nix-support/cc-wrapper-hook
|
||||
echo "export NOSV_HOME=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||
'';
|
||||
}
|
||||
|
||||
}).overrideAttrs (prev: { passthru = (prev.passthru or {}) // { inherit ompss2rt; }; })
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
diff --git a/m4/papi.m4 b/m4/papi.m4
|
||||
--- a/m4/papi.m4
|
||||
+++ b/m4/papi.m4
|
||||
@@ -24,12 +24,13 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
else
|
||||
PKG_CHECK_MODULES(
|
||||
[papi],
|
||||
- [papi],
|
||||
+ [papi >= 5.6.0],
|
||||
[
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([retrieved from pkg-config])
|
||||
papi_CPPFLAGS="${papi_CFLAGS}"
|
||||
ac_use_papi=yes
|
||||
+ ac_papi_version_correct=yes
|
||||
], [
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([not available])
|
||||
@@ -67,27 +68,29 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
fi
|
||||
|
||||
if test x"${ac_use_papi}" = x"yes" ; then
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
- else
|
||||
- papiBinary=papi_version
|
||||
- fi
|
||||
- papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
+ papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
+ else
|
||||
+ papiBinary=papi_version
|
||||
+ fi
|
||||
+ papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
|
||||
- AX_COMPARE_VERSION(
|
||||
- [[${papiVersion}]],
|
||||
- [[ge]],
|
||||
- [[5.6.0]],
|
||||
- [[ac_papi_version_correct=yes]],
|
||||
- [[ac_papi_version_correct=no]]
|
||||
- )
|
||||
+ AX_COMPARE_VERSION(
|
||||
+ [[${papiVersion}]],
|
||||
+ [[ge]],
|
||||
+ [[5.6.0]],
|
||||
+ [[ac_papi_version_correct=yes]],
|
||||
+ [[ac_papi_version_correct=no]]
|
||||
+ )
|
||||
|
||||
- if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
- AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
- ac_use_papi=no
|
||||
- else
|
||||
- AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
- AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
+ ac_use_papi=no
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
+ AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -80,7 +80,8 @@ in
|
||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
|
||||
# Most nanos6 api symbols are resolved at runtime, so prefer
|
||||
# ifunc by default
|
||||
(optional isCross "--with-symbol-resolution=ifunc");
|
||||
(optional isCross "--with-symbol-resolution=ifunc") ++
|
||||
(optional enablePapi "--with-papi=${papi}");
|
||||
|
||||
postConfigure = lib.optionalString (!enableDebug) ''
|
||||
# Disable debug
|
||||
@@ -96,7 +97,6 @@ in
|
||||
separateDebugInfo = true;
|
||||
|
||||
strictDeps = true;
|
||||
patches = [ ./check-papi-version-with-pkgconfig.patch ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
diff --git a/m4/papi.m4 b/m4/papi.m4
|
||||
index de905848..fa3db9a1 100644
|
||||
--- a/m4/papi.m4
|
||||
+++ b/m4/papi.m4
|
||||
@@ -24,12 +24,13 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
else
|
||||
PKG_CHECK_MODULES(
|
||||
[papi],
|
||||
- [papi],
|
||||
+ [papi >= 5.6.0],
|
||||
[
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([retrieved from pkg-config])
|
||||
papi_CFLAGS="${papi_CFLAGS}"
|
||||
ac_use_papi=yes
|
||||
+ ac_papi_version_correct=yes
|
||||
], [
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([not available])
|
||||
@@ -67,27 +68,29 @@ AC_DEFUN([AC_CHECK_PAPI],
|
||||
fi
|
||||
|
||||
if test x"${ac_use_papi}" = x"yes" ; then
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
- else
|
||||
- papiBinary=papi_version
|
||||
- fi
|
||||
- papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
+ papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
+ else
|
||||
+ papiBinary=papi_version
|
||||
+ fi
|
||||
+ papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
|
||||
- AX_COMPARE_VERSION(
|
||||
- [[${papiVersion}]],
|
||||
- [[ge]],
|
||||
- [[5.6.0]],
|
||||
- [[ac_papi_version_correct=yes]],
|
||||
- [[ac_papi_version_correct=no]]
|
||||
- )
|
||||
+ AX_COMPARE_VERSION(
|
||||
+ [[${papiVersion}]],
|
||||
+ [[ge]],
|
||||
+ [[5.6.0]],
|
||||
+ [[ac_papi_version_correct=yes]],
|
||||
+ [[ac_papi_version_correct=no]]
|
||||
+ )
|
||||
|
||||
- if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
- AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
- ac_use_papi=no
|
||||
- else
|
||||
- AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
- AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
+ ac_use_papi=no
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
+ AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -47,11 +47,10 @@ in
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
patches = [ ./check-papi-version-with-pkgconfig.patch ];
|
||||
configureFlags = [
|
||||
"--with-ovni=${ovni}"
|
||||
"CACHELINE_WIDTH=${toString cacheline}"
|
||||
];
|
||||
] ++ lib.optionals enablePapi [ "--with-papi=${papi}" ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
@@ -61,6 +60,7 @@ in
|
||||
hwloc
|
||||
ovni
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
patches = [ ./fix-papi.patch ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.bsc.es/nos-v/nos-v";
|
||||
|
||||
136
pkgs/nosv/fix-papi.patch
Normal file
136
pkgs/nosv/fix-papi.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
Commit ID: c09633f172ce4075e0a05a33f6dcbe8e03e1202a
|
||||
Change ID: onmwypnnrysktutwsvotqovzponvwrxs
|
||||
Bookmarks: fix/papi fix/papi@git fix/papi@origin
|
||||
Author : Aleix Boné <aleix.boneribo@bsc.es> (2025-12-10 11:14:14)
|
||||
Committer: Aleix Boné <aleix.boneribo@bsc.es> (2025-12-12 12:56:48)
|
||||
|
||||
Improve PAPI m4 module for cross compilation
|
||||
|
||||
diff --git a/m4/papi.m4 b/m4/papi.m4
|
||||
index de90584870..8398f856f5 100644
|
||||
--- a/m4/papi.m4
|
||||
+++ b/m4/papi.m4
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file is part of Nanos6 and is licensed under the terms contained in the COPYING file.
|
||||
#
|
||||
-# Copyright (C) 2021-2022 Barcelona Supercomputing Center (BSC)
|
||||
+# Copyright (C) 2021-2025 Barcelona Supercomputing Center (BSC)
|
||||
|
||||
AC_DEFUN([AC_CHECK_PAPI],
|
||||
[
|
||||
@@ -8,34 +8,38 @@
|
||||
[papi],
|
||||
[AS_HELP_STRING([--with-papi=prefix], [specify the installation prefix of PAPI])],
|
||||
[ ac_cv_use_papi_prefix=$withval ],
|
||||
- [ ac_cv_use_papi_prefix="" ]
|
||||
+ [ ac_cv_use_papi_prefix="check" ]
|
||||
)
|
||||
|
||||
if test x"${ac_cv_use_papi_prefix}" = x"no"; then
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([${ac_cv_use_papi_prefix}])
|
||||
ac_use_papi=no
|
||||
- elif test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
- AC_MSG_RESULT([${ac_cv_use_papi_prefix}])
|
||||
- papi_LIBS="-L${ac_cv_use_papi_prefix}/lib -lpapi -Wl,-rpath,${ac_cv_use_papi_prefix}/lib"
|
||||
- papi_CFLAGS="-I$ac_cv_use_papi_prefix/include"
|
||||
- ac_use_papi=yes
|
||||
- else
|
||||
+ elif test x"${ac_cv_use_papi_prefix}" = x""; then
|
||||
+ AC_MSG_RESULT([invalid prefix])
|
||||
+ AC_MSG_ERROR([papi prefix specified but empty])
|
||||
+ elif test x"${ac_cv_use_papi_prefix}" = x"yes" -o x"${ac_cv_use_papi_prefix}" = x"check"; then
|
||||
PKG_CHECK_MODULES(
|
||||
[papi],
|
||||
- [papi],
|
||||
+ [papi >= 5.6.0],
|
||||
[
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([retrieved from pkg-config])
|
||||
papi_CFLAGS="${papi_CFLAGS}"
|
||||
ac_use_papi=yes
|
||||
+ ac_papi_version_correct=yes
|
||||
], [
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([not available])
|
||||
ac_use_papi=no
|
||||
]
|
||||
)
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
+ AC_MSG_RESULT([${ac_cv_use_papi_prefix}])
|
||||
+ papi_LIBS="-L${ac_cv_use_papi_prefix}/lib -lpapi -Wl,-rpath,${ac_cv_use_papi_prefix}/lib"
|
||||
+ papi_CFLAGS="-I$ac_cv_use_papi_prefix/include"
|
||||
+ ac_use_papi=yes
|
||||
fi
|
||||
|
||||
if test x"${ac_use_papi}" = x"yes" ; then
|
||||
@@ -53,10 +57,10 @@
|
||||
ac_use_papi=yes
|
||||
],
|
||||
[
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- AC_MSG_ERROR([PAPI cannot be found.])
|
||||
+ if test x"${ac_cv_use_papi_prefix}" = x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI >= 5.6.0 cannot be found.])
|
||||
else
|
||||
- AC_MSG_WARN([PAPI cannot be found.])
|
||||
+ AC_MSG_WARN([PAPI >= 5.6.0 not available.])
|
||||
fi
|
||||
ac_use_papi=no
|
||||
]
|
||||
@@ -64,30 +68,38 @@
|
||||
|
||||
CFLAGS="${ac_save_CFLAGS}"
|
||||
LIBS="${ac_save_LIBS}"
|
||||
+ elif test x"${ac_cv_use_papi_prefix}" = x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI >= 5.6.0 cannot be found.])
|
||||
fi
|
||||
|
||||
- if test x"${ac_use_papi}" = x"yes" ; then
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
+ if test x"${ac_use_papi}" = x"yes" -a x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ if test x"${ac_cv_use_papi_prefix}" != x"yes" -a x"${ac_cv_use_papi_prefix}" != x"check" ; then
|
||||
papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
else
|
||||
papiBinary=papi_version
|
||||
fi
|
||||
- papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
|
||||
- AX_COMPARE_VERSION(
|
||||
- [[${papiVersion}]],
|
||||
- [[ge]],
|
||||
- [[5.6.0]],
|
||||
- [[ac_papi_version_correct=yes]],
|
||||
- [[ac_papi_version_correct=no]]
|
||||
- )
|
||||
|
||||
- if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
- AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
- ac_use_papi=no
|
||||
+ if test x"$cross_compiling" = x"yes" ; then
|
||||
+ AC_MSG_WARN([Cross-compiling detected, skipping PAPI version check])
|
||||
else
|
||||
- AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
- AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
+
|
||||
+ AX_COMPARE_VERSION(
|
||||
+ [[${papiVersion}]],
|
||||
+ [[ge]],
|
||||
+ [[5.6.0]],
|
||||
+ [[ac_papi_version_correct=yes]],
|
||||
+ [[ac_papi_version_correct=no]]
|
||||
+ )
|
||||
+
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
+ ac_use_papi=no
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
+ AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user