Update nanos6 and merge release with git

This commit is contained in:
Rodrigo Arias 2023-05-30 14:51:36 +02:00
parent df32aa62d0
commit 3a249c5d88
4 changed files with 67 additions and 130 deletions

View File

@ -1,21 +0,0 @@
diff --git a/src/instrument/ctf/ctfapi/CTFClock.hpp b/src/instrument/ctf/ctfapi/CTFClock.hpp
index 7df821c9..27cf269b 100644
--- a/src/instrument/ctf/ctfapi/CTFClock.hpp
+++ b/src/instrument/ctf/ctfapi/CTFClock.hpp
@@ -9,13 +9,9 @@
#include <time.h>
-// We prefer CLOCK_MONOTONIC_RAW to prevent dynamic NTF time adjustments.
-// However, if the system does not support it, we fall back to CLOCK_MONOTONIC
-
-#ifdef CLOCK_MONOTONIC_RAW
-#define CTF_CLOCK CLOCK_MONOTONIC_RAW
-#else
+// Always use the CLOCK_MONOTONIC clock as it is drift-corrected by NTP,
+// and is the most reliable to compensate changes the oscillator
+// frequency. It is not affected by time jumps.
#define CTF_CLOCK CLOCK_MONOTONIC
-#endif
#endif // CTF_CLOCK_HPP

View File

@ -15,61 +15,82 @@
, jemalloc ? null , jemalloc ? null
, cachelineBytes ? 64 , cachelineBytes ? 64
, enableGlibcxxDebug ? false , enableGlibcxxDebug ? false
, useGit ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
, gitCommit ? "58712e669ac02f721fb841247361ea54f53a6a47"
}: }:
assert enableJemalloc -> (jemalloc != null); assert enableJemalloc -> (jemalloc != null);
with lib; with lib;
stdenv.mkDerivation rec { let
pname = "nanos6"; release = rec {
version = "3.0"; version = "3.0";
src = fetchFromGitHub {
src = fetchFromGitHub { owner = "bsc-pm";
owner = "bsc-pm"; repo = "nanos6";
repo = "nanos6"; rev = "version-${version}";
rev = "version-${version}"; sha256 = "sha256-XEG8/8yQv5/OdSyK9Kig8xuWe6mTZ1eQKhXx3fXlQ1Y=";
sha256 = "sha256-XEG8/8yQv5/OdSyK9Kig8xuWe6mTZ1eQKhXx3fXlQ1Y="; };
}; };
prePatch = '' git = rec {
patchShebangs scripts/generate_config.sh version = src.shortRev;
patchShebangs autogen.sh src = builtins.fetchGit {
''; url = gitUrl;
ref = gitBranch;
rev = gitCommit;
};
};
enableParallelBuilding = true; source = if (useGit) then git else release;
in
stdenv.mkDerivation rec {
pname = "nanos6";
inherit (source) src version;
preConfigure = '' prePatch = ''
export CACHELINE_WIDTH=${toString cachelineBytes} patchShebangs scripts/generate_config.sh
./autogen.sh patchShebangs autogen.sh
''; '';
configureFlags = [ enableParallelBuilding = true;
"--with-hwloc=${hwloc}"
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
"--with-ovni=${ovni}"
] ++
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We preConfigure = ''
# disable all by default, which includes bindnow. export CACHELINE_WIDTH=${toString cachelineBytes}
hardeningDisable = [ "all" ]; ./autogen.sh
'' + lib.optionalString (useGit) ''
export NANOS6_GIT_VERSION=${src.rev}
export NANOS6_GIT_BRANCH=${gitBranch}
'';
# Keep debug symbols in the verbose variant of the library configureFlags = [
dontStrip = true; "--with-hwloc=${hwloc}"
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
"--with-ovni=${ovni}"
] ++
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
buildInputs = [ # The "bindnow" flags are incompatible with ifunc resolution mechanism. We
autoconf # disable all by default, which includes bindnow.
automake hardeningDisable = [ "all" ];
libtool
pkg-config
boost
numactl
hwloc
papi
ovni
];
} # Keep debug symbols in the verbose variant of the library
dontStrip = true;
buildInputs = [
autoconf
automake
libtool
pkg-config
boost
numactl
hwloc
papi
ovni
];
}

View File

@ -1,64 +0,0 @@
{
stdenv
, lib
, automake
, autoconf
, libtool
, pkg-config
, perl
, numactl
, hwloc
, papi
, boost
, enableJemalloc ? true
, jemalloc ? null
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
}:
with lib;
stdenv.mkDerivation rec {
pname = "nanos6";
version = "${src.shortRev}";
src = builtins.fetchGit {
url = gitUrl;
ref = gitBranch;
};
prePatch = ''
patchShebangs scripts/generate_config.sh
patchShebangs autogen.sh
'';
enableParallelBuilding = true;
dontStrip = true;
preConfigure = ''
export CACHELINE_WIDTH=${toString cachelineBytes}
export NANOS6_GIT_VERSION=${src.rev}
export NANOS6_GIT_BRANCH=${gitBranch}
./autogen.sh
'';
configureFlags = [ "--with-hwloc=${hwloc}" ]
++ (optional enableJemalloc "--with-jemalloc=${jemalloc}")
++ (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow.
hardeningDisable = [ "all" ];
buildInputs = [
autoconf
automake
libtool
pkg-config
boost
numactl
hwloc
papi ];
}

View File

@ -118,13 +118,14 @@ let
}) { CC = "clang"; CXX = "clang++"; }; }) { CC = "clang"; CXX = "clang++"; };
stdenvClangOmpss2 = self.stdenv.override { stdenvClangOmpss2 = self.stdenv.override {
cc = bsc.clangOmpss2Git; cc = bsc.clangOmpss2;
allowedRequisites = null; allowedRequisites = null;
}; };
clangNodes = bsc.clangOmpss2Git.override { clangNodes = bsc.clangOmpss2Git.override {
rt = bsc.nodes; rt = bsc.nodes;
}; };
stdenvClangNodes = self.stdenv.override { stdenvClangNodes = self.stdenv.override {
cc = bsc.clangNodes; cc = bsc.clangNodes;
allowedRequisites = null; allowedRequisites = null;
@ -142,7 +143,7 @@ let
# ================================================================= # =================================================================
nanos6 = bsc.nanos6Release; nanos6 = bsc.nanos6Release;
nanos6Release = callPackage ./bsc/nanos6/default.nix { }; nanos6Release = callPackage ./bsc/nanos6/default.nix { };
nanos6Git = callPackage ./bsc/nanos6/git.nix { }; nanos6Git = callPackage ./bsc/nanos6/default.nix { useGit = true; };
nanos6-icx = bsc.nanos6.override { nanos6-icx = bsc.nanos6.override {
stdenv = bsc.intel2023.stdenv; stdenv = bsc.intel2023.stdenv;
}; };