2020-08-10 15:27:46 +02:00
|
|
|
{
|
|
|
|
bsc
|
|
|
|
, nbody
|
|
|
|
, genApp
|
|
|
|
, genConfigs
|
|
|
|
, sbatch
|
2020-08-10 18:25:53 +02:00
|
|
|
, launcher
|
2020-08-10 15:27:46 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# Set the configuration for the experiment
|
|
|
|
config = {
|
|
|
|
cc = [ bsc.icc ];
|
|
|
|
blocksize = [ 1024 2048 4096 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Compute the cartesian product of all configurations
|
|
|
|
configList = genConfigs config;
|
|
|
|
# Generate each app variant via override
|
|
|
|
appList = genApp nbody configList;
|
|
|
|
|
|
|
|
# Job generator helper function
|
|
|
|
genJobs = map (app:
|
|
|
|
sbatch {
|
|
|
|
app = app;
|
2020-08-10 18:25:53 +02:00
|
|
|
nixPrefix = "/gpfs/projects/bsc15/nix";
|
2020-08-10 15:27:46 +02:00
|
|
|
exclusive = false;
|
|
|
|
ntasks = "1";
|
2020-08-10 18:25:53 +02:00
|
|
|
chdirPrefix = "/home/bsc15/bsc15557/bsc-nixpkgs/out";
|
2020-08-10 15:27:46 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
# Generate one job for each app variant
|
|
|
|
jobList = genJobs appList;
|
|
|
|
|
2020-08-10 18:25:53 +02:00
|
|
|
# And execute them all
|
|
|
|
main = launcher jobList;
|
2020-08-10 15:27:46 +02:00
|
|
|
in
|
2020-08-10 18:25:53 +02:00
|
|
|
main
|