Compare commits

..

9 Commits

Author SHA1 Message Date
2c15bfd5b9
Add skeleton meta to intel 2023
All checks were successful
CI / build:all (pull_request) Successful in 15s
2025-10-09 17:05:24 +02:00
f41c035b0d
Add meta to packages 2025-10-09 17:05:24 +02:00
824dee5c86
Add maintainers 2025-10-09 17:05:23 +02:00
67726c1d44 Fix nanos6 cross-compilation for riscv
All checks were successful
CI / build:all (pull_request) Successful in 15s
CI / build:all (push) Successful in 4s
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
Tested-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 15:49:01 +02:00
a971ed6a54 Fix cross compilation for lmbench
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 15:49:01 +02:00
06581e455c Disable papi when cross compiling
Even if we do an override to papi get the proper configure flags for
cross-compiling, the memory fences are not defined for risc-v:

mb.h:67:2: error: #error Need to define rmb for this architecture!

See: #184
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 15:48:45 +02:00
dd7f24f455 Replace __noChroot with requiredSystemFeatures
All checks were successful
CI / build:all (pull_request) Successful in 15s
CI / build:all (push) Successful in 4s
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
Tested-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 11:41:18 +02:00
64e2c39582 Add hwloc test with sys-devices feature
Reviewed-by: Aleix Boné <abonerib@bsc.es>
2025-10-09 11:41:06 +02:00
98d17b19d3 Enable custom sys-devices system feature
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2025-10-09 11:40:44 +02:00
13 changed files with 38 additions and 77 deletions

View File

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

View File

@ -0,0 +1,9 @@
{
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,33 +7,6 @@ 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 { };
@ -89,7 +62,7 @@ let
};
tests = rec {
#hwloc = callPackage ./test/bugs/hwloc.nix { }; # Broken, no /sys
hwloc = callPackage ./test/bugs/hwloc.nix { };
#sigsegv = callPackage ./test/reproducers/sigsegv.nix { };
hello-c = callPackage ./test/compilers/hello-c.nix { };
hello-cpp = callPackage ./test/compilers/hello-cpp.nix { };

View File

@ -20,6 +20,7 @@
#, python3Packages
, installShellFiles
, symlinkJoin
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
}:
let
@ -87,7 +88,7 @@ stdenv.mkDerivation rec {
--enable-sampling
--with-unwind=${libunwind.dev}
--with-xml-prefix=${libxml2.dev}
--with-papi=${papi}
${lib.optionalString enablePapi "--with-papi=${papi}"}
${if (mpi != null) then ''--with-mpi=${mpi}''
else ''--without-mpi''}
--without-dyninst)

View File

@ -43,15 +43,11 @@ 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
'';
};
@ -85,15 +81,11 @@ 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
'';
meta = {
@ -137,8 +129,6 @@ let
phases = [ "installPhase" "fixupPhase" ];
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,etc,lib,include}
mkdir -p $out/share/man
@ -155,8 +145,6 @@ 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
@ -200,8 +188,6 @@ let
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cd $src
@ -210,8 +196,6 @@ let
# Libraries
rsync -a lib/intel64/gcc4.8/ $out/lib/
popd
runHook postInstall
'';
meta = {
@ -252,8 +236,6 @@ let
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib,include}
mkdir -p $out/share/man
@ -278,8 +260,6 @@ let
rsync -a compiler/include/ $out/include/
popd
popd
runHook postInstall
'';
meta = {
@ -326,8 +306,6 @@ let
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib,include}
mkdir -p $out/share/man
@ -353,10 +331,7 @@ let
# Fix lib_lin
ln -s $out/lib $out/lib_lin
popd
runHook postInstall
'';
meta = {
@ -424,8 +399,6 @@ let
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
mkdir -p $out/share/man
@ -453,8 +426,6 @@ let
# Manuals
rsync -a documentation/en/man/common/ $out/share/man/
popd
runHook postInstall
'';
meta = {

View File

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

View File

@ -16,6 +16,7 @@
, 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"
@ -47,6 +48,8 @@ let
};
source = if (useGit) then git else release;
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in
stdenv.mkDerivation (source // {
pname = "nanos6";
@ -71,9 +74,13 @@ 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");
(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) ''
# Disable debug
@ -97,16 +104,14 @@ in
# TODO: papi_version is needed for configure:
# ./configure: line 27378: papi_version: command not found
# This probably breaks cross-compilation
papi
];
] ++ lib.optionals enablePapi [ papi ];
buildInputs = [
boost
numactl
hwloc
papi
ovni
];
] ++ lib.optionals enablePapi [ papi ];
# Create a script that sets NANOS6_HOME
postInstall = ''

View File

@ -7,7 +7,7 @@
, numactl
, hwloc
, papi
, enablePapi ? true
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
, cacheline ? 64 # bits
, ovni ? null
, useGit ? false

View File

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

View File

@ -23,9 +23,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# 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;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildInputs = [ openmp ];

View File

@ -36,9 +36,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# 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;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildInputs = [ nosv ];

View File

@ -24,9 +24,8 @@ in stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
# 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;
# nOS-V requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildPhase = ''
set -x

View File

@ -25,9 +25,10 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "all" ];
#NIX_DEBUG = 1;
buildInputs = [ ]; #strace gdb;
# 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;
# NODES requires access to /sys/devices to request NUMA information
requiredSystemFeatures = [ "sys-devices" ];
buildPhase = ''
set -x
#$CC -v