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
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
, useGit ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
, gitCommit ? "58712e669ac02f721fb841247361ea54f53a6a47"
}:
assert enableJemalloc -> (jemalloc != null);
with lib;
stdenv.mkDerivation rec {
pname = "nanos6";
version = "3.0";
src = fetchFromGitHub {
owner = "bsc-pm";
repo = "nanos6";
rev = "version-${version}";
sha256 = "sha256-XEG8/8yQv5/OdSyK9Kig8xuWe6mTZ1eQKhXx3fXlQ1Y=";
let
release = rec {
version = "3.0";
src = fetchFromGitHub {
owner = "bsc-pm";
repo = "nanos6";
rev = "version-${version}";
sha256 = "sha256-XEG8/8yQv5/OdSyK9Kig8xuWe6mTZ1eQKhXx3fXlQ1Y=";
};
};
prePatch = ''
patchShebangs scripts/generate_config.sh
patchShebangs autogen.sh
'';
git = rec {
version = src.shortRev;
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 = ''
export CACHELINE_WIDTH=${toString cachelineBytes}
./autogen.sh
'';
prePatch = ''
patchShebangs scripts/generate_config.sh
patchShebangs autogen.sh
'';
configureFlags = [
"--with-hwloc=${hwloc}"
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
"--with-ovni=${ovni}"
] ++
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
enableParallelBuilding = true;
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow.
hardeningDisable = [ "all" ];
preConfigure = ''
export CACHELINE_WIDTH=${toString cachelineBytes}
./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
dontStrip = true;
configureFlags = [
"--with-hwloc=${hwloc}"
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
"--with-ovni=${ovni}"
] ++
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
buildInputs = [
autoconf
automake
libtool
pkg-config
boost
numactl
hwloc
papi
ovni
];
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow.
hardeningDisable = [ "all" ];
}
# 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++"; };
stdenvClangOmpss2 = self.stdenv.override {
cc = bsc.clangOmpss2Git;
cc = bsc.clangOmpss2;
allowedRequisites = null;
};
clangNodes = bsc.clangOmpss2Git.override {
rt = bsc.nodes;
};
stdenvClangNodes = self.stdenv.override {
cc = bsc.clangNodes;
allowedRequisites = null;
@ -142,7 +143,7 @@ let
# =================================================================
nanos6 = bsc.nanos6Release;
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 {
stdenv = bsc.intel2023.stdenv;
};