nbody: Clean environment
This commit is contained in:
parent
1d5b528cd0
commit
ed7f6e3e97
@ -23,8 +23,8 @@ let
|
|||||||
mpi = pkgs.bsc.impi;
|
mpi = pkgs.bsc.impi;
|
||||||
|
|
||||||
# nbody runtime options
|
# nbody runtime options
|
||||||
particles = 1024*128;
|
particles = 1024*64;
|
||||||
timesteps = 20;
|
timesteps = 10;
|
||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
ntasksPerNode = "48";
|
ntasksPerNode = "48";
|
||||||
@ -79,13 +79,25 @@ let
|
|||||||
|
|
||||||
nixsetup = {stage, conf, ...}: with conf; w.nixsetup {
|
nixsetup = {stage, conf, ...}: with conf; w.nixsetup {
|
||||||
program = stageProgram stage;
|
program = stageProgram stage;
|
||||||
|
nixsetup = "${nixPrefix}/bin/nix-setup";
|
||||||
};
|
};
|
||||||
|
|
||||||
extrae = {stage, conf, ...}: w.extrae {
|
extrae = {stage, conf, ...}:
|
||||||
program = stageProgram stage;
|
let
|
||||||
traceLib = "mpi"; # mpi -> libtracempi.so
|
# We set the mpi implementation to the one specified in the conf, so all
|
||||||
configFile = ./extrae.xml;
|
# packages in bsc will use that one.
|
||||||
};
|
customPkgs = genPkgs (self: super: {
|
||||||
|
bsc = super.bsc // { mpi = conf.mpi; };
|
||||||
|
});
|
||||||
|
|
||||||
|
extrae = customPkgs.bsc.extrae;
|
||||||
|
in
|
||||||
|
w.extrae {
|
||||||
|
program = stageProgram stage;
|
||||||
|
extrae = extrae;
|
||||||
|
traceLib = "mpi"; # mpi -> libtracempi.so
|
||||||
|
configFile = ./extrae.xml;
|
||||||
|
};
|
||||||
|
|
||||||
argv = {stage, conf, ...}: w.argv {
|
argv = {stage, conf, ...}: w.argv {
|
||||||
program = stageProgram stage;
|
program = stageProgram stage;
|
||||||
@ -106,6 +118,14 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Print the environment to ensure we don't get anything nasty
|
||||||
|
envRecord = {stage, conf, ...}: w.envRecord {
|
||||||
|
program = stageProgram stage;
|
||||||
|
};
|
||||||
|
|
||||||
|
broom = {stage, conf, ...}: w.broom {
|
||||||
|
program = stageProgram stage;
|
||||||
|
};
|
||||||
# We may be able to use overlays by invoking the fix function directly, but we
|
# We may be able to use overlays by invoking the fix function directly, but we
|
||||||
# have to get the definition of the bsc packages and the garlic ones as
|
# have to get the definition of the bsc packages and the garlic ones as
|
||||||
# overlays.
|
# overlays.
|
||||||
@ -123,11 +143,18 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
stages = with common; []
|
stages = with common; []
|
||||||
# Use sbatch to request resources first
|
# Cleans ALL environment variables
|
||||||
++ optional enableSbatch sbatch
|
++ [ broom ]
|
||||||
|
|
||||||
# Repeats the next stages N times
|
# Use sbatch to request resources first
|
||||||
++ optionals enableControl [ nixsetup control ]
|
++ optionals enableSbatch [ sbatch nixsetup ]
|
||||||
|
|
||||||
|
# Record the current env vars set by SLURM to verify we don't have something
|
||||||
|
# nasty (like sourcing .bashrc). Take a look at #26
|
||||||
|
++ [ envRecord ]
|
||||||
|
|
||||||
|
# Repeats the next stages N=30 times
|
||||||
|
++ optional enableControl control
|
||||||
|
|
||||||
# Executes srun to launch the program in the requested nodes, and
|
# Executes srun to launch the program in the requested nodes, and
|
||||||
# immediately after enters the nix environment again, as slurmstepd launches
|
# immediately after enters the nix environment again, as slurmstepd launches
|
||||||
|
Reference in New Issue
Block a user