2021-04-20 16:14:44 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2021-04-20 16:14:44 +02:00
|
|
|
, stdexp
|
|
|
|
, bsc
|
|
|
|
, stages
|
|
|
|
, numactl
|
|
|
|
, garlicTools
|
|
|
|
}:
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2021-04-20 16:14:44 +02:00
|
|
|
with garlicTools;
|
|
|
|
|
|
|
|
rec {
|
|
|
|
getConfigs = {varConf, genConf}: stdexp.buildConfigs {
|
|
|
|
inherit varConf genConf;
|
|
|
|
};
|
|
|
|
|
|
|
|
exec = {nextStage, conf, ...}: stages.exec
|
|
|
|
(
|
|
|
|
{
|
|
|
|
inherit nextStage;
|
|
|
|
argv = with conf; [ "-t" timesteps "-p" particles ];
|
|
|
|
}
|
|
|
|
# Use numactl to use the interleave policy if requested (default is
|
|
|
|
# false)
|
|
|
|
// optionalAttrs (conf.interleaveMem or false) {
|
|
|
|
program = "${numactl}/bin/numactl --interleave=all ${stageProgram nextStage}";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
program = {nextStage, conf, ...}: bsc.garlic.apps.nbody.override {
|
|
|
|
inherit (conf) blocksize gitBranch;
|
|
|
|
};
|
|
|
|
|
|
|
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
|
|
|
}
|