hbp_nrp_distributed_nest.launch.DaintLauncher module

Helper class to build and execute a formatted srun command

class DaintLauncher(executable)[source]

Bases: object

Class constructs and executes the mpi in daint environment

add_host(hostname, tmpdir, processes=1)[source]

Ignore add_host in daint. Slurm (srun) manages this internally

Parameters
  • hostname – ignored

  • tmpdir – ignored

  • processes – ignored

build()[source]

Construct the srun command line string with all hosts provided.

launch()[source]

Launch the srun command and wait for successful startup of the CLE. Blocks until the CLE publishes completion on the status topic or if the srun command aborts.

run()[source]

Block until the srun command exits. Check the return code to determine if it was successful or aborted. Backwards compatibility in naming convention, must be run.

shutdown()[source]

Attempt to forecfully shutdown the srun command if it is still running and has not cleanly shut itself down. Guaranteed to be called after launch success or failure.