Compare commits
6 Commits
2c15bfd5b9
...
66df874b4a
Author | SHA1 | Date | |
---|---|---|---|
66df874b4a | |||
660604a9f5 | |||
30e75da14c | |||
f6864c7bce | |||
bec363d125 | |||
3750d0b599 |
@ -11,7 +11,6 @@
|
|||||||
./base/hw.nix
|
./base/hw.nix
|
||||||
./base/net.nix
|
./base/net.nix
|
||||||
./base/nix.nix
|
./base/nix.nix
|
||||||
./base/sys-devices.nix
|
|
||||||
./base/ntp.nix
|
./base/ntp.nix
|
||||||
./base/rev.nix
|
./base/rev.nix
|
||||||
./base/ssh.nix
|
./base/ssh.nix
|
||||||
|
@ -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"
|
|
||||||
];
|
|
||||||
}
|
|
29
overlay.nix
29
overlay.nix
@ -7,6 +7,33 @@ let
|
|||||||
callPackage = final.callPackage;
|
callPackage = final.callPackage;
|
||||||
|
|
||||||
bscPkgs = {
|
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 { };
|
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
|
||||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||||
@ -62,7 +89,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
tests = rec {
|
tests = rec {
|
||||||
hwloc = callPackage ./test/bugs/hwloc.nix { };
|
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
|
||||||
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
|
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
|
||||||
hello-c = callPackage ./test/compilers/hello-c.nix { };
|
hello-c = callPackage ./test/compilers/hello-c.nix { };
|
||||||
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };
|
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#, python3Packages
|
#, python3Packages
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -88,7 +87,7 @@ stdenv.mkDerivation rec {
|
|||||||
--enable-sampling
|
--enable-sampling
|
||||||
--with-unwind=${libunwind.dev}
|
--with-unwind=${libunwind.dev}
|
||||||
--with-xml-prefix=${libxml2.dev}
|
--with-xml-prefix=${libxml2.dev}
|
||||||
${lib.optionalString enablePapi "--with-papi=${papi}"}
|
--with-papi=${papi}
|
||||||
${if (mpi != null) then ''--with-mpi=${mpi}''
|
${if (mpi != null) then ''--with-mpi=${mpi}''
|
||||||
else ''--without-mpi''}
|
else ''--without-mpi''}
|
||||||
--without-dyninst)
|
--without-dyninst)
|
||||||
|
@ -43,11 +43,15 @@ let
|
|||||||
];
|
];
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
awk -F': ' '\
|
awk -F': ' '\
|
||||||
BEGIN { print "[ {" } \
|
BEGIN { print "[ {" } \
|
||||||
NR>1 && /^Package: / { print "} {"; } \
|
NR>1 && /^Package: / { print "} {"; } \
|
||||||
/: / { printf "%s = \"%s\";\n", $1, $2 } \
|
/: / { printf "%s = \"%s\";\n", $1, $2 } \
|
||||||
END { print "} ]" }' $srcs > $out
|
END { print "} ]" }' $srcs > $out
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,11 +85,15 @@ let
|
|||||||
nativeBuildInputs = [ dpkg ];
|
nativeBuildInputs = [ dpkg ];
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
for src in $srcs; do
|
for src in $srcs; do
|
||||||
echo "unpacking $src"
|
echo "unpacking $src"
|
||||||
dpkg -x $src $out
|
dpkg -x $src $out
|
||||||
done
|
done
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -129,6 +137,8 @@ let
|
|||||||
phases = [ "installPhase" "fixupPhase" ];
|
phases = [ "installPhase" "fixupPhase" ];
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/{bin,etc,lib,include}
|
mkdir -p $out/{bin,etc,lib,include}
|
||||||
mkdir -p $out/share/man
|
mkdir -p $out/share/man
|
||||||
|
|
||||||
@ -145,6 +155,8 @@ let
|
|||||||
# Broken due missing libze_loader.so.1
|
# Broken due missing libze_loader.so.1
|
||||||
rsync -a --exclude IMB-MPI1-GPU bin/ $out/bin/
|
rsync -a --exclude IMB-MPI1-GPU bin/ $out/bin/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
for i in $out/bin/mpi* ; do
|
for i in $out/bin/mpi* ; do
|
||||||
@ -188,6 +200,8 @@ let
|
|||||||
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
|
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
|
|
||||||
cd $src
|
cd $src
|
||||||
@ -196,6 +210,8 @@ let
|
|||||||
# Libraries
|
# Libraries
|
||||||
rsync -a lib/intel64/gcc4.8/ $out/lib/
|
rsync -a lib/intel64/gcc4.8/ $out/lib/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -236,6 +252,8 @@ let
|
|||||||
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
|
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/{bin,lib,include}
|
mkdir -p $out/{bin,lib,include}
|
||||||
mkdir -p $out/share/man
|
mkdir -p $out/share/man
|
||||||
|
|
||||||
@ -260,6 +278,8 @@ let
|
|||||||
rsync -a compiler/include/ $out/include/
|
rsync -a compiler/include/ $out/include/
|
||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -306,6 +326,8 @@ let
|
|||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/{bin,lib,include}
|
mkdir -p $out/{bin,lib,include}
|
||||||
mkdir -p $out/share/man
|
mkdir -p $out/share/man
|
||||||
|
|
||||||
@ -331,7 +353,10 @@ let
|
|||||||
|
|
||||||
# Fix lib_lin
|
# Fix lib_lin
|
||||||
ln -s $out/lib $out/lib_lin
|
ln -s $out/lib $out/lib_lin
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -399,6 +424,8 @@ let
|
|||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/{bin,lib}
|
mkdir -p $out/{bin,lib}
|
||||||
mkdir -p $out/share/man
|
mkdir -p $out/share/man
|
||||||
|
|
||||||
@ -426,6 +453,8 @@ let
|
|||||||
# Manuals
|
# Manuals
|
||||||
rsync -a documentation/en/man/common/ $out/share/man/
|
rsync -a documentation/en/man/common/ $out/share/man/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
|
|||||||
CFLAGS=-Wno-implicit-int
|
CFLAGS=-Wno-implicit-int
|
||||||
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
|
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
|
||||||
LDFLAGS=-ltirpc
|
LDFLAGS=-ltirpc
|
||||||
CC=$CC
|
|
||||||
AR=$AR
|
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
, jemallocNanos6 ? null
|
, jemallocNanos6 ? null
|
||||||
, cachelineBytes ? 64
|
, cachelineBytes ? 64
|
||||||
, enableGlibcxxDebug ? false
|
, enableGlibcxxDebug ? false
|
||||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
@ -48,8 +47,6 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
|
|
||||||
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (source // {
|
stdenv.mkDerivation (source // {
|
||||||
pname = "nanos6";
|
pname = "nanos6";
|
||||||
@ -74,13 +71,9 @@ in
|
|||||||
"--disable-all-instrumentations"
|
"--disable-all-instrumentations"
|
||||||
"--enable-ovni-instrumentation"
|
"--enable-ovni-instrumentation"
|
||||||
"--with-ovni=${ovni}"
|
"--with-ovni=${ovni}"
|
||||||
"--with-boost=${boost.dev}"
|
|
||||||
] ++
|
] ++
|
||||||
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
||||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
|
(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");
|
|
||||||
|
|
||||||
postConfigure = lib.optionalString (!enableDebug) ''
|
postConfigure = lib.optionalString (!enableDebug) ''
|
||||||
# Disable debug
|
# Disable debug
|
||||||
@ -104,14 +97,16 @@ in
|
|||||||
# TODO: papi_version is needed for configure:
|
# TODO: papi_version is needed for configure:
|
||||||
# ./configure: line 27378: papi_version: command not found
|
# ./configure: line 27378: papi_version: command not found
|
||||||
# This probably breaks cross-compilation
|
# This probably breaks cross-compilation
|
||||||
] ++ lib.optionals enablePapi [ papi ];
|
papi
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
numactl
|
numactl
|
||||||
hwloc
|
hwloc
|
||||||
|
papi
|
||||||
ovni
|
ovni
|
||||||
] ++ lib.optionals enablePapi [ papi ];
|
];
|
||||||
|
|
||||||
# Create a script that sets NANOS6_HOME
|
# Create a script that sets NANOS6_HOME
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
, numactl
|
, numactl
|
||||||
, hwloc
|
, hwloc
|
||||||
, papi
|
, papi
|
||||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
, enablePapi ? true
|
||||||
, cacheline ? 64 # bits
|
, cacheline ? 64 # bits
|
||||||
, ovni ? null
|
, ovni ? null
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "hwloc-test";
|
name = "hwloc-test";
|
||||||
requiredSystemFeatures = [ "sys-devices" ];
|
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ stdenv.mkDerivation {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
ls -l /sys
|
ls -l /sys
|
||||||
gcc -lhwloc hwloc.c -o hwloc
|
gcc -lhwloc hwloc.c -o hwloc
|
||||||
strace ./hwloc > $out
|
strace ./hwloc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ in stdenv.mkDerivation {
|
|||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
# nOS-V requires access to /sys/devices to request NUMA information
|
# nOS-V requires access to /sys/devices to request NUMA information. It will
|
||||||
requiredSystemFeatures = [ "sys-devices" ];
|
# fail to run otherwise, so we disable the sandbox for this test.
|
||||||
|
__noChroot = true;
|
||||||
|
|
||||||
buildInputs = [ openmp ];
|
buildInputs = [ openmp ];
|
||||||
|
|
||||||
|
@ -36,8 +36,9 @@ in stdenv.mkDerivation {
|
|||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
# nOS-V requires access to /sys/devices to request NUMA information
|
# nOS-V requires access to /sys/devices to request NUMA information. It will
|
||||||
requiredSystemFeatures = [ "sys-devices" ];
|
# fail to run otherwise, so we disable the sandbox for this test.
|
||||||
|
__noChroot = true;
|
||||||
|
|
||||||
buildInputs = [ nosv ];
|
buildInputs = [ nosv ];
|
||||||
|
|
||||||
|
@ -24,8 +24,9 @@ in stdenv.mkDerivation {
|
|||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
# nOS-V requires access to /sys/devices to request NUMA information
|
# nOS-V requires access to /sys/devices to request NUMA information. It will
|
||||||
requiredSystemFeatures = [ "sys-devices" ];
|
# fail to run otherwise, so we disable the sandbox for this test.
|
||||||
|
__noChroot = true;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
set -x
|
set -x
|
||||||
|
@ -25,10 +25,9 @@ stdenv.mkDerivation rec {
|
|||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
#NIX_DEBUG = 1;
|
#NIX_DEBUG = 1;
|
||||||
buildInputs = [ ]; #strace gdb;
|
buildInputs = [ ]; #strace gdb;
|
||||||
|
# NODES requires access to /sys/devices to request NUMA information. It will
|
||||||
# NODES requires access to /sys/devices to request NUMA information
|
# fail to run otherwise, so we disable the sandbox for this test.
|
||||||
requiredSystemFeatures = [ "sys-devices" ];
|
__noChroot = true;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
set -x
|
set -x
|
||||||
#$CC -v
|
#$CC -v
|
||||||
|
Loading…
x
Reference in New Issue
Block a user