Compare commits

..

6 Commits

30 changed files with 193 additions and 131 deletions

View File

@ -11,7 +11,6 @@
./base/hw.nix
./base/net.nix
./base/nix.nix
./base/sys-devices.nix
./base/ntp.nix
./base/rev.nix
./base/ssh.nix

View File

@ -1,9 +0,0 @@
{
nix.settings.system-features = [ "sys-devices" ];
programs.nix-required-mounts.enable = true;
programs.nix-required-mounts.allowedPatterns.sys-devices.paths = [
"/sys/devices/system/cpu"
"/sys/devices/system/node"
];
}

View File

@ -7,6 +7,33 @@ let
callPackage = final.callPackage;
bscPkgs = {
# override stdenv to add a sentinel to know if a derivation comes
# from unfree sources.
stdenv = prev.stdenv // {
mkDerivation =
args:
let
originalDrv = prev.stdenv.mkDerivation args;
checkLicense = l: if builtins.isAttrs l then !(l.free or true) else false;
licenses = if builtins.isList args.meta.license then args.meta.license else [ args.meta.license ];
hasUnfreeLicense =
if args ? meta && args.meta ? license then builtins.any checkLicense licenses else false;
in
if hasUnfreeLicense then
builtins.traceVerbose "adding nix-support/private to ${originalDrv.name or originalDrv.pname}" (
originalDrv.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
mkdir -p $out/nix-support
touch $out/nix-support/private
'';
}))
else
originalDrv;
};
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
bench6 = callPackage ./pkgs/bench6/default.nix { };
bigotes = callPackage ./pkgs/bigotes/default.nix { };
@ -62,7 +89,7 @@ let
};
tests = rec {
hwloc = callPackage ./test/bugs/hwloc.nix { };
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
hello-c = callPackage ./test/compilers/hello-c.nix { };
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };

View File

@ -60,11 +60,11 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
dontStrip = true;
meta = {
meta = with lib; {
homepage = "https://gitlab.pm.bsc.es/rarias/bench6";
description = "Set of micro-benchmarks for OmpSs-2 and several mini-apps";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3;
};
}

View File

@ -16,11 +16,11 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ cmake ];
meta = {
meta = with lib; {
homepage = "https://github.com/rodarima/bigotes";
description = "Versatile benchmark tool";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3;
};
}

View File

@ -20,7 +20,6 @@
#, python3Packages
, installShellFiles
, symlinkJoin
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
}:
let
@ -88,7 +87,7 @@ stdenv.mkDerivation rec {
--enable-sampling
--with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev}
${lib.optionalString enablePapi "--with-papi=${papi}"}
--with-papi=${papi}
${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''}
--without-dyninst)
@ -112,11 +111,11 @@ stdenv.mkDerivation rec {
# else []
# );
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-performance-tools/extrae";
description = "Instrumentation framework to generate execution traces of the most used parallel runtimes";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.lgpl21Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.lgpl21Plus;
};
}

View File

@ -54,11 +54,11 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
meta = {
meta = with lib; {
homepage = "https://pm.bsc.es/gitlab/interoperability/extern/GPI-2";
description = "GPI-2 extended for supporting Task-Aware GASPI (TAGASPI) library";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3;
};
}

View File

@ -61,11 +61,11 @@ stdenv.mkDerivation rec {
popd
'';
meta = {
meta = with lib; {
homepage = "https://www.intel.com/content/www/us/en/developer/tools/overview.html";
description = "Intel compiler";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.unfree;
};
}

View File

@ -145,12 +145,12 @@ in
popd
'';
meta = {
meta = with lib; {
homepage = "https://www.intel.com/content/www/us/en/developer/tools/overview.html";
description = "Intel compiler";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.unfree;
};
}

View File

@ -103,11 +103,11 @@ stdenv.mkDerivation rec {
echo "Patched RPATH in libfabric.so to: $(patchelf --print-rpath $out/lib/libfabric.so)"
'';
meta = {
meta = with lib; {
homepage = "https://www.intel.com/content/www/us/en/developer/tools/overview.html";
description = "Intel compiler";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.unfree;
};
}

View File

@ -26,13 +26,6 @@
let
meta = {
description = "Intel oneapi hpckit package component";
homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html";
license = lib.licenses.unfree;
maintainers = with lib.maintainers.bsc; [ abonerib ];
};
gcc = gcc13;
v = {
@ -50,11 +43,15 @@ let
];
phases = [ "installPhase" ];
installPhase = ''
runHook preInstall
awk -F': ' '\
BEGIN { print "[ {" } \
NR>1 && /^Package: / { print "} {"; } \
/: / { printf "%s = \"%s\";\n", $1, $2 } \
END { print "} ]" }' $srcs > $out
runHook postInstall
'';
};
@ -88,14 +85,23 @@ let
nativeBuildInputs = [ dpkg ];
phases = [ "installPhase" ];
installPhase = ''
runHook preInstall
mkdir -p $out
for src in $srcs; do
echo "unpacking $src"
dpkg -x $src $out
done
runHook postInstall
'';
inherit meta;
meta = {
description = "";
homepage = "";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
};
};
joinDebs = name: names:
@ -131,6 +137,8 @@ let
phases = [ "installPhase" "fixupPhase" ];
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,etc,lib,include}
mkdir -p $out/share/man
@ -147,6 +155,8 @@ let
# Broken due missing libze_loader.so.1
rsync -a --exclude IMB-MPI1-GPU bin/ $out/bin/
popd
runHook postInstall
'';
preFixup = ''
for i in $out/bin/mpi* ; do
@ -155,7 +165,12 @@ let
done
'';
inherit meta;
meta = {
description = "";
homepage = "";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
};
};
intel-tbb = stdenv.mkDerivation rec {
@ -185,6 +200,8 @@ let
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cd $src
@ -193,9 +210,16 @@ let
# Libraries
rsync -a lib/intel64/gcc4.8/ $out/lib/
popd
runHook postInstall
'';
inherit meta;
meta = {
description = "";
homepage = "";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
};
};
intel-compiler-shared = stdenv.mkDerivation rec {
@ -228,6 +252,8 @@ let
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib,include}
mkdir -p $out/share/man
@ -252,9 +278,16 @@ let
rsync -a compiler/include/ $out/include/
popd
popd
runHook postInstall
'';
inherit meta;
meta = {
description = "";
homepage = "";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
};
};
@ -293,6 +326,8 @@ let
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib,include}
mkdir -p $out/share/man
@ -318,10 +353,18 @@ let
# Fix lib_lin
ln -s $out/lib $out/lib_lin
popd
runHook postInstall
'';
inherit meta;
meta = {
description = "";
homepage = "";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
};
};
intel-compiler = stdenv.mkDerivation rec {
@ -381,6 +424,8 @@ let
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
mkdir -p $out/share/man
@ -408,9 +453,16 @@ let
# Manuals
rsync -a documentation/en/man/common/ $out/share/man/
popd
runHook postInstall
'';
inherit meta;
meta = {
description = "";
homepage = "";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ ];
};
};
wrapIntel = { cc, mygcc, extraBuild ? "", extraInstall ? "" }:

View File

@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
CFLAGS=-Wno-implicit-int
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
LDFLAGS=-ltirpc
CC=$CC
AR=$AR
)
'';

View File

@ -64,11 +64,11 @@ stdenv.mkDerivation rec {
# "--enable-bison-regeneration"
];
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/mcxx";
description = "C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping";
maintainers = with lib.maintainers.bsc; [ rpenacob ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rpenacob ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -59,11 +59,11 @@ stdenv.mkDerivation rec {
# "--enable-bison-regeneration"
];
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/mcxx";
description = "C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping";
maintainers = with lib.maintainers.bsc; [ rpenacob ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rpenacob ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -58,11 +58,11 @@ stdenv.mkDerivation rec {
# make generate_builtins_ia32 GXX_X86_BUILTINS=${gcc}/bin/g++
#'';
#
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/mcxx";
description = "C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -16,7 +16,6 @@
, jemallocNanos6 ? null
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, useGit ? false
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
@ -48,8 +47,6 @@ let
};
source = if (useGit) then git else release;
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in
stdenv.mkDerivation (source // {
pname = "nanos6";
@ -74,13 +71,9 @@ in
"--disable-all-instrumentations"
"--enable-ovni-instrumentation"
"--with-ovni=${ovni}"
"--with-boost=${boost.dev}"
] ++
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
# Most nanos6 api symbols are resolved at runtime, so prefer
# ifunc by default
(optional isCross "--with-symbol-resolution=ifunc");
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
postConfigure = lib.optionalString (!enableDebug) ''
# Disable debug
@ -104,14 +97,16 @@ in
# TODO: papi_version is needed for configure:
# ./configure: line 27378: papi_version: command not found
# This probably breaks cross-compilation
] ++ lib.optionals enablePapi [ papi ];
papi
];
buildInputs = [
boost
numactl
hwloc
papi
ovni
] ++ lib.optionals enablePapi [ papi ];
];
# Create a script that sets NANOS6_HOME
postInstall = ''
@ -119,12 +114,12 @@ in
echo "export NANOS6_HOME=$out" >> $out/nix-support/setup-hook
'';
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/nanos6";
description = "Nanos6 runtime for OmpSs-2" +
optionalString (enableDebug) " (with debug symbols)";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.latforms.linux;
license = lib.licenses.gpl3;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3;
};
})

View File

@ -88,12 +88,12 @@ stdenv.mkDerivation rec {
cp ${nix_conf} $out/share/nix.conf
'';
meta = {
meta = with lib; {
homepage = null;
description = "nix bubblewrap wrapper";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus; # TODO: license?
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus; # TODO: license?
};
}

View File

@ -17,11 +17,11 @@ stdenv.mkDerivation rec {
preBuild = "env";
dontPatchShebangs = true;
meta = {
meta = with lib; {
homepage = "https://gitlab.pm.bsc.es/rarias/nixtools";
description = "nix bubblewrap wrapper";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus; # TODO: license?
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus; # TODO: license?
};
}

View File

@ -82,11 +82,11 @@ in
inherit nosv;
};
meta = {
meta = with lib; {
homepage = "https://gitlab.bsc.es/nos-v/nodes";
description = "Runtime library designed to work on top of the nOS-V runtime";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -7,7 +7,7 @@
, numactl
, hwloc
, papi
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, enablePapi ? true
, cacheline ? 64 # bits
, ovni ? null
, useGit ? false
@ -60,11 +60,11 @@ in
ovni
] ++ lib.optionals enablePapi [ papi ];
meta = {
meta = with lib; {
homepage = "https://gitlab.bsc.es/nos-v/nos-v";
description = "Tasking library enables the co-execution of multiple applications with system-wide scheduling and a centralized management of resources";
maintainers = with lib.maintainers.bsc; [ abonerib ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ abonerib ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -56,11 +56,11 @@ in
checkTarget = "test";
hardeningDisable = [ "all" ];
meta = {
meta = with lib; {
homepage = "https://ovni.readthedocs.io";
description = "Obtuse but Versatile Nanoscale Instrumentation";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -90,11 +90,11 @@ stdenv.mkDerivation rec {
mv $out/share/doc/wxparaver_help_contents/man $out/share/man/man1
'';
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-performance-tools/wxparaver";
description = "Trace-based visualization and analysis tool designed to study quantitative detailed metrics and obtain qualitative knowledge of the performance of applications, libraries, processors and whole architectures";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.lgpl21Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.lgpl21Plus;
};
}

View File

@ -29,11 +29,11 @@ stdenv.mkDerivation rec {
mpi
];
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/sonar";
description = "Set of runtime libraries which instrument parallel programming models through the ovni instrumentation library";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.mit;
};
}

View File

@ -57,11 +57,11 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/tagaspi";
description = "Task-Aware GASPI";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -62,11 +62,11 @@ in stdenv.mkDerivation {
dontDisableStatic = true;
hardeningDisable = [ "all" ];
meta = {
meta = with lib; {
homepage = "https://github.com/bsc-pm/tampi";
description = "Task-Aware MPI";
maintainers = with lib.maintainers.bsc; [ rarias ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl3Plus;
maintainers = with maintainers.bsc; [ rarias ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@ -6,7 +6,6 @@
stdenv.mkDerivation {
name = "hwloc-test";
requiredSystemFeatures = [ "sys-devices" ];
src = ./.;
@ -15,7 +14,7 @@ stdenv.mkDerivation {
buildPhase = ''
ls -l /sys
gcc -lhwloc hwloc.c -o hwloc
strace ./hwloc > $out
strace ./hwloc
'';
}

View File

@ -23,8 +23,9 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildInputs = [ openmp ];

View File

@ -36,8 +36,9 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildInputs = [ nosv ];

View File

@ -24,8 +24,9 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# nOS-V requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildPhase = ''
set -x

View File

@ -25,10 +25,9 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
#NIX_DEBUG = 1;
buildInputs = [ ]; #strace gdb;
# NODES requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
# NODES requires access to /sys/devices to request NUMA information. It will
# fail to run otherwise, so we disable the sandbox for this test.
__noChroot = true;
buildPhase = ''
set -x
#$CC -v