HWRF  trunk@4391
Functions | Variables
produtil.mpi_impl.srun Namespace Reference

Adds SLURM srun support to produtil.run. More...

Detailed Description

Adds SLURM srun support to produtil.run.

This module is part of the mpi_impl package – see produtil.mpi_impl for details. This translates produtil.run directives to SLURM srun commands.

Functions

def runsync
 Runs the "sync" command as an exe(). More...
 
def openmp (arg, threads)
 Adds OpenMP support to the provided object. More...
 
def detect ()
 Detects whether the SLURM srun command is available by looking for it in the $PATH. More...
 
def can_run_mpi ()
 Does this module represent an MPI implementation? Returns True. More...
 
def make_bigexe (exe, kwargs)
 Returns an ImmutableRunner that will run the specified program. More...
 
def mpirunner (arg, allranks=False, kwargs)
 Turns a produtil.mpiprog.MPIRanksBase tree into a produtil.prog.Runner. More...
 
def mpirunner_impl (arg, allranks=False, kwargs)
 This is the underlying implementation of mpirunner and should not be called directly. More...
 

Variables

tuple srun_path = produtil.fileop.find_exe('srun',raise_missing=False)
 Path to the srun program.
 
tuple module_logger = logging.getLogger('lsf_cray_intel')
 

Function Documentation

def produtil.mpi_impl.srun.can_run_mpi ( )

Does this module represent an MPI implementation? Returns True.

Definition at line 46 of file srun.py.

def produtil.mpi_impl.srun.detect ( )

Detects whether the SLURM srun command is available by looking for it in the $PATH.

Definition at line 41 of file srun.py.

def produtil.mpi_impl.srun.make_bigexe (   exe,
  kwargs 
)

Returns an ImmutableRunner that will run the specified program.

Returns
an empty list
Parameters
exeThe executable to run on compute nodes.
kwargsIgnored.

Definition at line 50 of file srun.py.

def produtil.mpi_impl.srun.mpirunner (   arg,
  allranks = False,
  kwargs 
)

Turns a produtil.mpiprog.MPIRanksBase tree into a produtil.prog.Runner.

Parameters
arga tree of produtil.mpiprog.MPIRanksBase objects
allranksif True, and only one rank is requested by arg, then all MPI ranks will be used
kwargspassed to produtil.mpi_impl.mpi_impl_base.CMDFGen when mpiserial is in use.
Returns
a produtil.prog.Runner that will run the selected MPI program

Definition at line 57 of file srun.py.

def produtil.mpi_impl.srun.mpirunner_impl (   arg,
  allranks = False,
  kwargs 
)

This is the underlying implementation of mpirunner and should not be called directly.

Definition at line 69 of file srun.py.

Referenced by produtil.mpi_impl.srun.mpirunner().

def produtil.mpi_impl.srun.openmp (   arg,
  threads 
)

Adds OpenMP support to the provided object.

Parameters
argAn produtil.prog.Runner or produtil.mpiprog.MPIRanksBase object tree
threadsthe number of threads, or threads per rank, an integer

Definition at line 25 of file srun.py.

def produtil.mpi_impl.srun.runsync (   logger = None)

Runs the "sync" command as an exe().

Definition at line 18 of file srun.py.