bscpkgs/overlay.nix

378 lines
12 KiB
Nix
Raw Normal View History

2020-09-16 18:22:55 +08:00
self: /* Future last stage */
super: /* Previous stage */
with self.lib;
2020-09-16 18:22:55 +08:00
let
inherit (self.lib) callPackageWith;
inherit (self.lib) callPackagesWith;
2020-12-04 01:06:51 +08:00
appendPasstru = drv: attrs: drv.overrideAttrs (old:{
passthru = old.passthru // attrs;
});
# ===================================================================
2020-09-21 20:34:08 +08:00
# BSC Packages
# ===================================================================
2020-09-21 20:34:08 +08:00
_bsc = makeExtensible (bsc:
let
callPackage = callPackageWith (self // bsc // bsc.garlic);
in
{
inherit callPackage;
2020-09-16 18:22:55 +08:00
# =================================================================
# Compilers
# =================================================================
2020-09-16 18:22:55 +08:00
# Default C (and C++) compiler to use. It will be overwritten by the
# experiments.
cc = bsc.icc;
2020-09-16 18:22:55 +08:00
# By default we use Intel compiler 2020 update 1
intelLicense = callPackage ./bsc/intel-compiler/license.nix { };
iccUnwrapped = bsc.icc2020Unwrapped;
2020-09-16 18:22:55 +08:00
icc2020Unwrapped = callPackage ./bsc/intel-compiler/icc2020.nix {
intel-mpi = bsc.intelMpi;
2020-09-16 18:22:55 +08:00
};
2021-06-16 20:26:48 +08:00
icc2021Unwrapped = callPackage ./bsc/intel-compiler/icc2021.nix { };
intel-oneapi-2023 = callPackage ./bsc/intel-oneapi/2023.nix {
libffi = self.libffi_3_3;
};
intel2023 = {
inherit (bsc.intel-oneapi-2023)
stdenv icx stdenv-ifort ifort
# Deprecated in mid 2023
stdenv-icc icc;
};
2022-11-10 06:39:57 +08:00
intel2022 = {
icc = bsc.icc2021;
};
2022-11-10 06:39:57 +08:00
intel2021 = {
icc = bsc.icc2021;
};
2022-11-10 06:39:57 +08:00
# A wrapper script that puts all the flags and environment vars
# properly and calls the intel compiler binary
2021-06-16 20:26:48 +08:00
icc2020 = appendPasstru (callPackage ./bsc/intel-compiler/default.nix {
iccUnwrapped = bsc.iccUnwrapped;
intelLicense = bsc.intelLicense;
2020-12-04 01:06:51 +08:00
}) { CC = "icc"; CXX = "icpc"; };
2020-09-16 18:22:55 +08:00
2021-06-16 20:26:48 +08:00
icc2021 = appendPasstru (callPackage ./bsc/intel-compiler/wrapper2021.nix {
iccUnwrapped = bsc.icc2021Unwrapped;
2021-07-05 23:06:23 +08:00
}) { CC = "icx"; CXX = "icpx"; };
2021-06-16 20:26:48 +08:00
2022-11-10 06:39:57 +08:00
ifort2022 = callPackage ./bsc/intel-compiler/default.nix {
iccUnwrapped = bsc.ifort2022Unwrapped;
intelLicense = bsc.intelLicense;
};
icx = bsc.intel2023.icx;
icc = bsc.intel2023.icc;
ifort = bsc.intel2023.ifort;
2021-06-16 20:26:48 +08:00
2020-12-04 01:06:51 +08:00
# We need to set the cc.CC and cc.CXX attributes, in order to
2020-10-13 23:43:23 +08:00
# determine the name of the compiler
2020-12-04 01:06:51 +08:00
gcc = appendPasstru self.gcc { CC = "gcc"; CXX = "g++"; };
2020-10-13 23:43:23 +08:00
# Last llvm release by default
llvmPackages = self.llvmPackages_11 // {
clang = appendPasstru self.llvmPackages_11.clang {
CC = "clang"; CXX = "clang++";
};
2020-09-16 18:22:55 +08:00
};
lld = bsc.llvmPackages.lld;
2020-10-05 18:33:44 +08:00
clangOmpss2Unwrapped = callPackage ./bsc/llvm-ompss2/clang.nix {
stdenv = bsc.llvmPackages.stdenv;
2020-09-16 18:22:55 +08:00
};
clangOmpss2UnwrappedGit = bsc.clangOmpss2Unwrapped.overrideAttrs (old: rec {
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git";
ref = "master";
};
version = src.shortRev;
});
clangOmpss2 = appendPasstru (
callPackage ./bsc/llvm-ompss2/default.nix {
2023-03-06 18:47:01 +08:00
llvmPackages = self.llvmPackages_latest;
clangOmpss2Unwrapped = bsc.clangOmpss2Unwrapped;
}) { CC = "clang"; CXX = "clang++"; };
2020-09-21 20:34:08 +08:00
clangOmpss2Git = appendPasstru (
callPackage ./bsc/llvm-ompss2/default.nix {
clangOmpss2Unwrapped = bsc.clangOmpss2UnwrappedGit;
}) { CC = "clang"; CXX = "clang++"; };
2023-03-06 18:47:01 +08:00
stdenvClangOmpss2 = self.stdenv.override {
cc = bsc.clangOmpss2;
allowedRequisites = null;
};
2023-03-13 23:16:34 +08:00
clangNodes = bsc.clangOmpss2.override {
nanos6 = bsc.nodes;
};
stdenvClangNodes = self.stdenv.override {
cc = bsc.clangNodes;
allowedRequisites = null;
};
2020-11-20 01:50:30 +08:00
mcxx = bsc.mcxxRelease;
mcxxRelease = callPackage ./bsc/mcxx/default.nix { };
2021-06-02 20:08:16 +08:00
mcxxGit = callPackage ./bsc/mcxx/git.nix { };
2020-09-21 20:34:08 +08:00
mcxxRarias = callPackage ./bsc/mcxx/rarias.nix {
bison = self.bison_3_5;
};
2020-09-16 18:22:55 +08:00
# =================================================================
# nanos6
# =================================================================
2020-11-20 01:50:30 +08:00
nanos6 = bsc.nanos6Release;
nanos6Release = callPackage ./bsc/nanos6/default.nix { };
2020-09-21 23:30:24 +08:00
nanos6Git = callPackage ./bsc/nanos6/git.nix { };
nanos6-icx = bsc.nanos6.override {
stdenv = bsc.intel2023.stdenv;
};
nanos6-icc = bsc.nanos6.override {
stdenv = bsc.intel2023.stdenv-icc;
};
2020-12-04 18:18:44 +08:00
nanos6Debug = bsc.nanos6.overrideAttrs (old: {
dontStrip = true;
enableDebugging = true;
});
nanos6GlibcxxDebug = bsc.nanos6Debug.override {
enableGlibcxxDebug = true;
};
2020-09-16 18:22:55 +08:00
2020-10-20 00:42:41 +08:00
jemalloc = self.jemalloc.overrideAttrs (old:
{
# Custom nanos6 configure options
configureFlags = old.configureFlags ++ [
"--with-jemalloc-prefix=nanos6_je_"
"--enable-stats"
];
hardeningDisable = [ "all" ];
2020-10-20 00:42:41 +08:00
});
2023-03-13 23:16:34 +08:00
nodes = callPackage ./bsc/nodes/git.nix { };
nodesWithOvni = bsc.nodes.override { enableOvni = true; };
2021-11-30 23:18:06 +08:00
# =================================================================
# nosv
# =================================================================
nosv = callPackage ./bsc/nosv/default.nix { };
# =================================================================
# MPI
# =================================================================
2020-10-20 00:42:41 +08:00
# Default MPI implementation to use. Will be overwritten by the
# experiments.
mpi = bsc.impi;
2020-10-17 00:18:31 +08:00
# ParaStation MPI
pscom = callPackage ./bsc/parastation/pscom.nix { };
psmpi = callPackage ./bsc/parastation/psmpi.nix { };
2020-09-16 18:22:55 +08:00
# MPICH
2023-03-02 20:08:01 +08:00
#mpich_3 = callPackage ./bsc/mpich/default.nix { };
#mpichDebug_3 = bsc.mpich.override { enableDebug = true; };
mpich = super.mpich.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ self.libfabric ];
configureFlags = old.configureFlags ++ [
"--with-device=ch4:ofi"
"--with-libfabric=${self.libfabric}"
];
hardeningDisable = [ "all" ];
});
2020-09-16 18:22:55 +08:00
# Default Intel MPI version is 2019 (the last one)
impi = bsc.intelMpi;
intelMpi = bsc.intelMpi2019;
intelMpi2019 = callPackage ./bsc/intel-mpi/default.nix { };
2020-11-11 21:45:02 +08:00
# OpenMPI
openmpi = bsc.openmpi-mn4;
openmpi-mn4 = callPackage ./bsc/openmpi/default.nix {
pmix = bsc.pmix2;
pmi2 = bsc.slurm17-libpmi2;
enableCxx = true;
2020-12-04 01:06:51 +08:00
};
# TAMPI
tampi = bsc.tampiRelease;
tampiRelease = callPackage ./bsc/tampi/default.nix { };
tampiGit = callPackage ./bsc/tampi/git.nix { };
2020-12-03 23:43:50 +08:00
2021-07-13 18:37:04 +08:00
# =================================================================
# GASPI
# =================================================================
gpi-2 = callPackage ./bsc/gpi-2/default.nix { };
# Use GPI-2 as the default implementation for GASPI
gaspi = bsc.gpi-2;
tagaspi = callPackage ./bsc/tagaspi/default.nix { };
# =================================================================
# Tracing
# =================================================================
2020-09-16 18:22:55 +08:00
paraverKernel = callPackage ./bsc/paraver/kernel.nix { };
wxparaver = callPackage ./bsc/paraver/default.nix { };
# We should maintain these...
paraverKernelFast = callPackage ./bsc/paraver/kernel-fast.nix { };
wxparaverFast = callPackage ./bsc/paraver/wxparaver-fast.nix { };
2023-03-02 18:43:35 +08:00
extrae = callPackage ./bsc/extrae/default.nix {
libdwarf = super.libdwarf_20210528;
};
otf = callPackage ./bsc/otf/default.nix { };
vite = self.qt5.callPackage ./bsc/vite/default.nix { };
babeltrace = callPackage ./bsc/babeltrace/default.nix { };
babeltrace2 = callPackage ./bsc/babeltrace2/default.nix { };
2020-09-16 18:22:55 +08:00
# Perf for MN4 kernel
perf = callPackage ./bsc/perf/default.nix {
kernel = self.linuxPackages_4_9.kernel;
systemtap = self.linuxPackages_4_9.systemtap;
2020-09-16 18:22:55 +08:00
};
2021-02-16 00:44:20 +08:00
cn6 = callPackage ./bsc/cn6/default.nix { };
2021-11-30 22:58:58 +08:00
ovni = callPackage ./bsc/ovni/default.nix { };
ovniKernel = callPackage ./bsc/ovni/default.nix {
gitBranch = "kernel-context-switch";
gitCommit = null;
};
2021-01-19 01:42:07 +08:00
# =================================================================
# MN4 specific
# =================================================================
osumb = callPackage ./bsc/osu/default.nix { };
2021-03-04 00:43:09 +08:00
lmbench = callPackage ./bsc/lmbench/default.nix { };
pmix2 = callPackage ./bsc/pmix/pmix2.nix { };
slurm17 = callPackage ./bsc/slurm/default.nix {
pmix = bsc.pmix2;
2020-09-16 18:22:55 +08:00
};
slurm17-libpmi2 = callPackage ./bsc/slurm/pmi2.nix {
pmix = bsc.pmix2;
};
# Use a slurm compatible with MN4
slurm = bsc.slurm17;
# We need the unstable branch to get the fallocate problem fixed, as it is
# not yet in stable nix, see:
# https://pm.bsc.es/gitlab/rarias/bscpkgs/-/issues/83
nix-mn4 = self.nixUnstable;
# Our custom version that lacks the binaries. Disabled by default.
#rdma-core = callPackage ./bsc/rdma-core/default.nix { };
2020-09-16 18:22:55 +08:00
# =================================================================
# Patched from upstream
# =================================================================
groff = callPackage ./bsc/groff/default.nix { };
fftw = callPackage ./bsc/fftw/default.nix { };
vtk = callPackage ./bsc/vtk/default.nix {
inherit (self.xorg) libX11 xorgproto libXt;
};
2020-09-16 18:22:55 +08:00
2020-10-06 01:13:02 +08:00
busybox = self.busybox.override {
enableStatic = true;
};
# =================================================================
# Misc
# =================================================================
dummy = callPackage ./bsc/dummy/default.nix { };
mpptest = callPackage ./bsc/mpptest/default.nix { };
2021-03-19 03:03:44 +08:00
cpuid = callPackage ./bsc/cpuid/default.nix { };
# =================================================================
# Garlic benchmark
# =================================================================
2020-11-03 18:16:58 +08:00
2020-10-13 20:16:30 +08:00
nixtools = callPackage ./bsc/nixtools/default.nix { };
2020-10-05 18:33:44 +08:00
2020-10-09 21:55:37 +08:00
garlicTools = callPackage ./garlic/tools.nix {};
2020-11-17 17:57:17 +08:00
# Aliases bsc.apps -> bsc.garlic.apps
inherit (bsc.garlic) apps fig exp ds;
garlic = import ./garlic/index.nix {
inherit self super bsc callPackage;
2020-10-09 21:55:37 +08:00
};
test = rec {
# hwloc = callPackage ./test/bugs/hwloc.nix { };
sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
compilers.hello-c = callPackage ./test/compilers/hello-c.nix { };
compilers.hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };
compilers.hello-f = callPackage ./test/compilers/hello-f.nix { };
2023-03-06 18:47:01 +08:00
compilers.lto = callPackage ./test/compilers/lto.nix { };
compilers.intel2023.icx.c = compilers.hello-c.override {
stdenv = bsc.intel2023.stdenv;
};
compilers.intel2023.icc.c = compilers.hello-c.override {
stdenv = bsc.intel2023.stdenv-icc;
};
compilers.intel2023.icx.cpp = compilers.hello-cpp.override {
stdenv = bsc.intel2023.stdenv;
};
compilers.intel2023.icc.cpp = compilers.hello-cpp.override {
stdenv = bsc.intel2023.stdenv-icc;
};
compilers.intel2023.ifort = compilers.hello-f.override {
stdenv = bsc.intel2023.stdenv-ifort;
};
2023-03-06 18:47:01 +08:00
compilers.clangOmpss2.lto = compilers.lto.override {
stdenv = bsc.stdenvClangOmpss2;
};
2023-03-13 21:54:40 +08:00
compilers.clangOmpss2.task = callPackage ./test/compilers/ompss2.nix {
stdenv = bsc.stdenvClangOmpss2;
};
2023-03-13 23:16:34 +08:00
compilers.clangNodes.task = callPackage ./test/compilers/ompss2.nix {
stdenv = bsc.stdenvClangNodes;
};
};
2023-03-02 18:15:25 +08:00
testAll = with bsc.test; [
compilers.intel2023.icx.c
compilers.intel2023.icc.c
compilers.intel2023.icx.cpp
compilers.intel2023.icc.cpp
compilers.intel2023.ifort
2023-03-06 18:47:01 +08:00
compilers.clangOmpss2.lto
2023-03-13 21:54:40 +08:00
compilers.clangOmpss2.task
2023-03-13 23:16:34 +08:00
compilers.clangNodes.task
];
2023-03-02 18:15:25 +08:00
ci = import ./test/ci.nix {
inherit self super bsc callPackage;
};
});
2020-09-16 18:22:55 +08:00
in
{
bsc = _bsc;
garlic = _bsc.garlic;
2020-11-17 17:57:17 +08:00
# Aliases apps -> bsc.garlic.apps
inherit (_bsc.garlic) apps fig exp ds;
2020-09-16 18:22:55 +08:00
}