diff --git a/bsc/nodes/git.nix b/bsc/nodes/git.nix new file mode 100644 index 0000000..a19ae3f --- /dev/null +++ b/bsc/nodes/git.nix @@ -0,0 +1,60 @@ +{ + stdenv +, lib +, automake +, autoconf +, libtool +, pkg-config +, perl +, numactl +, hwloc +, papi +, boost +, autoreconfHook +, jemalloc +, enableOvni ? false +, ovni ? null +, nosv +, gitUrl ? "ssh://git@gitlab-internal.bsc.es/nos-v/nodes.git" +, gitBranch ? "master" +}: + +with lib; + +stdenv.mkDerivation rec { + pname = "nodes"; + version = "${src.shortRev}"; + + src = builtins.fetchGit { + url = gitUrl; + ref = gitBranch; + }; + + enableParallelBuilding = true; + dontStrip = true; + + configureFlags = [ + "--with-jemalloc=${jemalloc}" + "--with-nosv=${nosv}" + ] ++ + (optional enableOvni "--with-ovni=${ovni}"); + + # The "bindnow" flags are incompatible with ifunc resolution mechanism. We + # disable all by default, which includes bindnow. + hardeningDisable = [ "all" ]; + + buildInputs = [ + autoreconfHook + autoconf + automake + libtool + pkg-config + boost + numactl + hwloc + papi + jemalloc + nosv + ] ++ + (optional enableOvni ovni); +} diff --git a/overlay.nix b/overlay.nix index 071644a..9ac4cdb 100644 --- a/overlay.nix +++ b/overlay.nix @@ -119,6 +119,14 @@ let allowedRequisites = null; }; + clangNodes = bsc.clangOmpss2.override { + nanos6 = bsc.nodes; + }; + stdenvClangNodes = self.stdenv.override { + cc = bsc.clangNodes; + allowedRequisites = null; + }; + mcxx = bsc.mcxxRelease; mcxxRelease = callPackage ./bsc/mcxx/default.nix { }; mcxxGit = callPackage ./bsc/mcxx/git.nix { }; @@ -159,6 +167,9 @@ let hardeningDisable = [ "all" ]; }); + nodes = callPackage ./bsc/nodes/git.nix { }; + nodesWithOvni = bsc.nodes.override { enableOvni = true; }; + # ================================================================= # nosv # ================================================================= @@ -335,6 +346,9 @@ let compilers.clangOmpss2.task = callPackage ./test/compilers/ompss2.nix { stdenv = bsc.stdenvClangOmpss2; }; + compilers.clangNodes.task = callPackage ./test/compilers/ompss2.nix { + stdenv = bsc.stdenvClangNodes; + }; }; testAll = with bsc.test; [ @@ -345,6 +359,7 @@ let compilers.intel2023.ifort compilers.clangOmpss2.lto compilers.clangOmpss2.task + compilers.clangNodes.task ]; ci = import ./test/ci.nix { diff --git a/test/compilers/ompss2.nix b/test/compilers/ompss2.nix index 3127ac5..b2862d4 100644 --- a/test/compilers/ompss2.nix +++ b/test/compilers/ompss2.nix @@ -1,4 +1,4 @@ -{ stdenv, writeText, which, strace }: +{ stdenv, writeText, which, strace, gdb }: let task_c = writeText "task.c" '' @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { dontConfigure = true; hardeningDisable = [ "all" ]; NIX_DEBUG = 1; + buildInputs = [ strace gdb ]; + __noChroot = true; # Required for NODES buildPhase = '' set -x echo CC=$CC @@ -32,7 +34,9 @@ stdenv.mkDerivation rec { cp ${task_c} task.c cat task.c $CC -v -fompss-2 task.c -o task - ./task + #strace -ff -e trace=open,openat -s9999999 ./task + LD_DEBUG=libs ./task + #gdb -batch -ex "run" -ex "bt" ./task set +x '';