Add new package NODES

This commit is contained in:
Rodrigo Arias 2023-03-13 16:16:34 +01:00
parent 9fae434553
commit 243ed2331a
3 changed files with 81 additions and 2 deletions

60
bsc/nodes/git.nix Normal file
View File

@ -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);
}

View File

@ -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 {

View File

@ -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
'';