Test runner script WIP
This commit is contained in:
parent
7c92f713cd
commit
c7c8d858f4
@ -8,7 +8,7 @@ let
|
||||
callPackages = pkgs.lib.callPackagesWith (pkgs // bsc // garlic);
|
||||
|
||||
# Load some helper functions to generate app variants
|
||||
inherit (import ./gen.nix) genApps genConfigs;
|
||||
inherit (import ./gen.nix) genApps genApp genConfigs;
|
||||
|
||||
garlic = rec {
|
||||
|
||||
@ -21,6 +21,10 @@ let
|
||||
gitBranch = "garlic/seq";
|
||||
};
|
||||
|
||||
runner = callPackage ./runner.nix {
|
||||
app = null;
|
||||
};
|
||||
|
||||
exp = {
|
||||
mpiImpl = callPackage ./experiments {
|
||||
apps = genApps [ ppong ] (
|
||||
@ -31,12 +35,20 @@ let
|
||||
};
|
||||
|
||||
nbody = callPackage ./experiments {
|
||||
apps = genApps [ nbody ] (
|
||||
apps = genApp nbody [
|
||||
{ cc=bsc.icc;
|
||||
cflags="-march=core-avx2"; }
|
||||
{ cc=bsc.clang-ompss2;
|
||||
cflags="-O3 -march=core-avx2 -ffast-math -Rpass-analysis=loop-vectorize"; }
|
||||
];
|
||||
};
|
||||
|
||||
nbody-blocksize = callPackage ./experiments {
|
||||
apps = genApp nbody (
|
||||
genConfigs {
|
||||
cc = [ pkgs.gcc7 pkgs.gcc9 ];
|
||||
gitBranch = [ "garlic/seq" ];
|
||||
}
|
||||
);
|
||||
cc = [ bsc.icc ];
|
||||
blocksize = [ "1024" "2048" ];
|
||||
});
|
||||
};
|
||||
|
||||
# Test if there is any difference between intel -march and -xCORE
|
||||
@ -47,7 +59,7 @@ let
|
||||
cflags = [ "-march=core-avx2" "-xCORE-AVX2" ];
|
||||
}) ++ ( genConfigs {
|
||||
cc = [ bsc.clang-ompss2 ];
|
||||
cflags = [ "-march=core-avx2 -Rpass-analysis=loop-vectorize" ];
|
||||
cflags = [ "-O3 -march=core-avx2 -Rpass-analysis=loop-vectorize" ];
|
||||
}));
|
||||
};
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ let
|
||||
genConfigs = (config: lib.foldl mergeConfig [{}] (attrToList config));
|
||||
|
||||
# Generate multiple app versions by override with each config
|
||||
genApp = (app: configs: map (conf: app.override conf) configs);
|
||||
genApp = (app: configs: map (conf: app.override conf // {conf=conf;}) configs);
|
||||
|
||||
# Generate app version from an array of apps
|
||||
genApps = (apps: configs:
|
||||
|
27
bsc/garlic/runner.nix
Normal file
27
bsc/garlic/runner.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
stdenv
|
||||
, app
|
||||
, argv ? ""
|
||||
, binary ? "/bin/run"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${app.name}-runner";
|
||||
preferLocalBuild = true;
|
||||
|
||||
src = ./.;
|
||||
|
||||
buildInputs = [ app ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > $out/bin/run <<EOF
|
||||
#!/bin/bash
|
||||
exec ${app}${binary} ${argv}
|
||||
done
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/run
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user