2022-09-12 17:35:17 +02:00
|
|
|
let
|
|
|
|
pkgs = import (builtins.fetchTarball
|
2023-03-20 20:52:49 +01:00
|
|
|
"https://pm.bsc.es/gitlab/rarias/bscpkgs/-/archive/master/bscpkgs-master.tar.gz");
|
2022-09-12 17:35:17 +02:00
|
|
|
|
|
|
|
rWrapper = pkgs.rWrapper.override {
|
|
|
|
packages = with pkgs.rPackages; [ tidyverse rjson jsonlite egg viridis ];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Recursively set MPI
|
|
|
|
bsc = pkgs.bsc.extend (last: prev: {
|
|
|
|
|
2023-03-22 19:05:48 +01:00
|
|
|
include-what-you-use = let
|
|
|
|
gcc = pkgs.gcc;
|
|
|
|
targetConfig = pkgs.stdenv.targetPlatform.config;
|
|
|
|
in pkgs.wrapCCWith rec {
|
|
|
|
cc = pkgs.include-what-you-use;
|
|
|
|
extraBuildCommands = ''
|
|
|
|
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
|
|
|
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
|
|
|
echo "-isystem${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}/include" >> $out/nix-support/cc-cflags
|
|
|
|
wrap include-what-you-use $wrapper $ccPath/include-what-you-use
|
|
|
|
substituteInPlace "$out/bin/include-what-you-use" --replace 'dontLink=0' 'dontLink=1'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-12-19 11:24:18 +01:00
|
|
|
# Build ovni with old gcc versions
|
|
|
|
genOldOvni = stdenv: (last.ovni.override {
|
|
|
|
stdenv = stdenv;
|
|
|
|
}).overrideAttrs (old: {
|
|
|
|
pname = old.name + "@" + stdenv.cc.cc.version;
|
2022-12-19 13:06:00 +01:00
|
|
|
cmakeFlags = old.cmakeFlags ++ [
|
|
|
|
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF"
|
|
|
|
];
|
2022-12-19 11:24:18 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
oldCompilers = [
|
2022-12-19 14:27:12 +01:00
|
|
|
#pkgs.gcc49Stdenv # broken
|
2022-12-19 11:24:18 +01:00
|
|
|
pkgs.gcc6Stdenv
|
|
|
|
pkgs.gcc7Stdenv
|
|
|
|
pkgs.gcc8Stdenv
|
|
|
|
pkgs.gcc9Stdenv
|
|
|
|
pkgs.gcc10Stdenv
|
|
|
|
pkgs.gcc11Stdenv
|
|
|
|
pkgs.gcc12Stdenv
|
|
|
|
];
|
|
|
|
|
|
|
|
oldOvnis = map last.genOldOvni last.oldCompilers;
|
|
|
|
|
2022-12-19 13:18:54 +01:00
|
|
|
genOldOvniNoLTO = stdenv: (last.genOldOvni stdenv).overrideAttrs (old: {
|
|
|
|
cmakeFlags = old.cmakeFlags ++ [
|
|
|
|
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF"
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
oldOvnisNoLTO = map last.genOldOvniNoLTO last.oldCompilers;
|
|
|
|
|
2022-12-19 14:27:12 +01:00
|
|
|
genOldOvniRelease = stdenv: (last.genOldOvni stdenv).overrideAttrs (old: {
|
|
|
|
cmakeBuildType = "Release";
|
|
|
|
});
|
|
|
|
|
|
|
|
oldOvnisRelease = map last.genOldOvniRelease last.oldCompilers;
|
|
|
|
|
2022-09-12 17:35:17 +02:00
|
|
|
# Now we rebuild ovni with the Nanos6 and nOS-V versions, which were
|
|
|
|
# linked to the previous ovni. We need to be able to exit the chroot
|
|
|
|
# to run Nanos6 tests, as they require access to /sys for hwloc
|
|
|
|
ovni-rt = (last.ovni.override {
|
2023-05-30 17:09:41 +02:00
|
|
|
stdenv = last.stdenvClangOmpss2;
|
2022-09-12 17:35:17 +02:00
|
|
|
}).overrideAttrs (old: {
|
|
|
|
__noChroot = true;
|
|
|
|
buildInputs = old.buildInputs ++ [
|
2023-03-22 19:05:48 +01:00
|
|
|
last.include-what-you-use
|
2022-09-12 17:35:17 +02:00
|
|
|
pkgs.gdb
|
|
|
|
last.nosv
|
2022-09-13 15:36:55 +02:00
|
|
|
last.nanos6
|
2022-10-04 19:52:43 +02:00
|
|
|
last.nodes
|
2022-09-12 17:35:17 +02:00
|
|
|
pkgs.strace
|
|
|
|
];
|
2023-05-30 17:09:41 +02:00
|
|
|
#preConfigure = ''
|
|
|
|
# export NODES_HOME="${last.nodes}"
|
|
|
|
# export NANOS6_HOME="${last.nanos6}"
|
|
|
|
#'';
|
2022-09-12 17:35:17 +02:00
|
|
|
});
|
2023-04-14 13:14:52 +02:00
|
|
|
|
|
|
|
ovni-nompi = last.ovni.overrideAttrs (old: {
|
|
|
|
buildInputs = pkgs.lib.filter (x: x != last.mpi ) old.buildInputs;
|
|
|
|
cmakeFlags = old.cmakeFlags ++ [ "-DUSE_MPI=OFF" ];
|
|
|
|
});
|
|
|
|
|
2023-04-24 12:28:31 +02:00
|
|
|
ovni-asan = last.ovni-rt.overrideAttrs (old: {
|
|
|
|
cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_BUILD_TYPE=Asan" ];
|
|
|
|
# Ignore leaks in tests for now, only check memory errors
|
|
|
|
preCheck = old.preCheck + ''
|
|
|
|
export ASAN_OPTIONS=detect_leaks=0
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2022-09-12 17:35:17 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
in
|
2022-12-19 11:24:18 +01:00
|
|
|
pkgs // { bsc = bsc; }
|