Move apps into garlic/apps
This commit is contained in:
parent
a576be8031
commit
332b738889
@ -59,7 +59,7 @@ let
|
|||||||
bsc = super.bsc // { mpi = conf.mpi; };
|
bsc = super.bsc // { mpi = conf.mpi; };
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
customPkgs.garlic.nbody.override {
|
customPkgs.apps.nbody.override {
|
||||||
inherit cc blocksize mpi gitBranch;
|
inherit cc blocksize mpi gitBranch;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -71,5 +71,4 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
elemAt units 0
|
stdexp.buildExperiment units
|
||||||
#buildExperiment units
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
mn4 = {
|
mn4 = {
|
||||||
config = {
|
config = {
|
||||||
name = "mn4";
|
name = "mn4";
|
||||||
|
sshHosts = [ "mn1" "mn2" "mn3" ];
|
||||||
nixPrefix = "/gpfs/projects/bsc15/nix";
|
nixPrefix = "/gpfs/projects/bsc15/nix";
|
||||||
cachelineBytes = 64;
|
cachelineBytes = 64;
|
||||||
march = "skylake-avx512";
|
march = "skylake-avx512";
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
{ lib }:
|
|
||||||
|
|
||||||
let inherit (lib) optional; in
|
|
||||||
|
|
||||||
mkDerivation:
|
|
||||||
|
|
||||||
args:
|
|
||||||
|
|
||||||
let
|
|
||||||
args_ = {
|
|
||||||
|
|
||||||
enableParallelBuilding = args.enableParallelBuilding or true;
|
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
|
||||||
|
|
||||||
};
|
|
||||||
in
|
|
||||||
|
|
||||||
mkDerivation (args // args_)
|
|
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
stdenv
|
|
||||||
, particles
|
|
||||||
, timestamps
|
|
||||||
, program
|
|
||||||
, config
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
inherit program;
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit config;
|
|
||||||
};
|
|
||||||
|
|
||||||
name = "${program.name}-argv";
|
|
||||||
preferLocalBuild = true;
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
dontPatchShebangs = true;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cat > $out/bin/run <<EOF
|
|
||||||
#!/bin/sh
|
|
||||||
exec ${program}/bin/run -p ${toString config.particles} -t ${toString config.timesteps}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x $out/bin/run
|
|
||||||
'';
|
|
||||||
}
|
|
@ -3,8 +3,8 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
units:
|
units
|
||||||
}
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{
|
{
|
||||||
nextStage
|
nextStage
|
||||||
, nixPrefix
|
, nixPrefix
|
||||||
, clusterName
|
, clusterName ? "mn4"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with garlicTools;
|
with garlicTools;
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
, nixtools
|
, nixtools
|
||||||
|
, garlicTools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
program
|
nextStage
|
||||||
, nixPrefix
|
, nixPrefix
|
||||||
|
|
||||||
|
# FIXME: These two should be specified in the configuration of the machine
|
||||||
, sshHost ? "mn"
|
, sshHost ? "mn"
|
||||||
, targetCluster ? "mn4"
|
, targetCluster ? "mn4"
|
||||||
, stage
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
program = garlicTools.stageProgram nextStage;
|
||||||
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "trebuchet";
|
name = "trebuchet";
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
@ -25,7 +30,7 @@ stdenv.mkDerivation {
|
|||||||
# to see what is being executed.
|
# to see what is being executed.
|
||||||
|
|
||||||
# $out
|
# $out
|
||||||
${stage.desc}
|
${nextStage.desc}
|
||||||
|
|
||||||
nixtools=${nixPrefix}${nixtools}/bin
|
nixtools=${nixPrefix}${nixtools}/bin
|
||||||
runexp=\$nixtools/${targetCluster}/runexp
|
runexp=\$nixtools/${targetCluster}/runexp
|
||||||
|
@ -15,11 +15,11 @@ in
|
|||||||
rec {
|
rec {
|
||||||
/* Takes a list of units and builds an experiment, after executing the
|
/* Takes a list of units and builds an experiment, after executing the
|
||||||
trebuchet and the isolate stages. Returns the trebuchet stage. */
|
trebuchet and the isolate stages. Returns the trebuchet stage. */
|
||||||
buildExperiment = {units, conf, ...}: stage.trebuchet {
|
buildExperiment = units: stages.trebuchet {
|
||||||
inherit (machineConf) nixPrefix;
|
inherit (machineConf) nixPrefix;
|
||||||
nextStage = stage.isolate {
|
nextStage = stages.isolate {
|
||||||
inherit (machineConf) nixPrefix;
|
inherit (machineConf) nixPrefix;
|
||||||
nextStage = stage.experiment {
|
nextStage = stages.experiment {
|
||||||
inherit units;
|
inherit units;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -73,7 +73,7 @@ rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# FIXME: Remove this hack and allow custom nixpkgs
|
# FIXME: Remove this hack and allow custom nixpkgs
|
||||||
bscOverlay = import ../../overlay.nix;
|
bscOverlay = import ../overlay.nix;
|
||||||
nixpkgs = import <nixpkgs>;
|
nixpkgs = import <nixpkgs>;
|
||||||
genPkgs = newOverlay: nixpkgs {
|
genPkgs = newOverlay: nixpkgs {
|
||||||
overlays = [
|
overlays = [
|
52
overlay.nix
52
overlay.nix
@ -143,6 +143,8 @@ let
|
|||||||
garlicTools = callPackage ./garlic/tools.nix {};
|
garlicTools = callPackage ./garlic/tools.nix {};
|
||||||
|
|
||||||
garlic = {
|
garlic = {
|
||||||
|
# TODO: move into garlic/default.nix
|
||||||
|
|
||||||
# Configuration for the machines
|
# Configuration for the machines
|
||||||
machines = callPackage ./garlic/machines.nix {};
|
machines = callPackage ./garlic/machines.nix {};
|
||||||
|
|
||||||
@ -151,18 +153,14 @@ let
|
|||||||
|
|
||||||
# Load some helper functions to generate app variants
|
# Load some helper functions to generate app variants
|
||||||
|
|
||||||
stdexp = callPackage ./garlic/exp/stdexp.nix {
|
stdexp = callPackage ./garlic/stdexp.nix {
|
||||||
inherit (self.garlic) targetMachine stages;
|
inherit (self.garlic) targetMachine stages;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Apps for Garlic
|
# Apps for Garlic
|
||||||
# heat = callPackage ./garlic/heat {
|
|
||||||
# stdenv = pkgs.gcc7Stdenv;
|
apps = {
|
||||||
# mpi = intel-mpi;
|
creams = callPackage ./garlic/apps/creams/default.nix {
|
||||||
# tampi = tampi;
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
creams = callPackage ./garlic/creams {
|
|
||||||
gnuDef = self.gfortran10 ; # Default GNU compiler version
|
gnuDef = self.gfortran10 ; # Default GNU compiler version
|
||||||
intelDef = self.bsc.icc ; # Default Intel compiler version
|
intelDef = self.bsc.icc ; # Default Intel compiler version
|
||||||
|
|
||||||
@ -172,21 +170,11 @@ let
|
|||||||
mpi = self.bsc.mpi; # self.bsc.mpi OR self.bsc.openmpi-mn4;
|
mpi = self.bsc.mpi; # self.bsc.mpi OR self.bsc.openmpi-mn4;
|
||||||
};
|
};
|
||||||
|
|
||||||
creamsInput = callPackage ./garlic/creams/input.nix {
|
creamsInput = callPackage ./garlic/apps/creams/input.nix {
|
||||||
gitBranch = "garlic/mpi+send+seq";
|
gitBranch = "garlic/mpi+send+seq";
|
||||||
};
|
};
|
||||||
|
|
||||||
# lulesh = callPackage ./garlic/lulesh {
|
nbody = callPackage ./garlic/apps/nbody/default.nix {
|
||||||
# mpi = intel-mpi;
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
# hpcg = callPackage ./garlic/hpcg { };
|
|
||||||
#
|
|
||||||
# hpccg = callPackage ./garlic/hpccg { };
|
|
||||||
#
|
|
||||||
# fwi = callPackage ./garlic/fwi { };
|
|
||||||
|
|
||||||
nbody = callPackage ./garlic/nbody {
|
|
||||||
cc = self.bsc.icc;
|
cc = self.bsc.icc;
|
||||||
mpi = self.bsc.mpi;
|
mpi = self.bsc.mpi;
|
||||||
tampi = self.bsc.tampi;
|
tampi = self.bsc.tampi;
|
||||||
@ -194,10 +182,27 @@ let
|
|||||||
gitBranch = "garlic/seq";
|
gitBranch = "garlic/seq";
|
||||||
};
|
};
|
||||||
|
|
||||||
saiph = callPackage ./garlic/saiph/default.nix {
|
saiph = callPackage ./garlic/apps/saiph/default.nix {
|
||||||
cc = self.bsc.clangOmpss2;
|
cc = self.bsc.clangOmpss2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# heat = callPackage ./garlic/apps/heat {
|
||||||
|
# stdenv = pkgs.gcc7Stdenv;
|
||||||
|
# mpi = intel-mpi;
|
||||||
|
# tampi = tampi;
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# lulesh = callPackage ./garlic/apps/lulesh {
|
||||||
|
# mpi = intel-mpi;
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# hpcg = callPackage ./garlic/apps/hpcg { };
|
||||||
|
#
|
||||||
|
# hpccg = callPackage ./garlic/apps/hpccg { };
|
||||||
|
#
|
||||||
|
# fwi = callPackage ./garlic/apps/fwi { };
|
||||||
|
};
|
||||||
|
|
||||||
# Execution stages
|
# Execution stages
|
||||||
stages = {
|
stages = {
|
||||||
sbatch = callPackage ./garlic/stages/sbatch.nix { };
|
sbatch = callPackage ./garlic/stages/sbatch.nix { };
|
||||||
@ -317,9 +322,8 @@ in
|
|||||||
{
|
{
|
||||||
bsc = bsc;
|
bsc = bsc;
|
||||||
|
|
||||||
# Alias
|
# Aliases
|
||||||
garlic = bsc.garlic;
|
garlic = bsc.garlic;
|
||||||
|
|
||||||
# Alias
|
|
||||||
exp = bsc.garlic.exp;
|
exp = bsc.garlic.exp;
|
||||||
|
apps = bsc.garlic.apps;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user