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

Adds LSF+IBMPE support to produtil.run. More...

Detailed Description

Adds LSF+IBMPE support to produtil.run.

This module is part of the produtil.mpi_impl package. It underlies the produtil.run.openmp, produtil.run.mpirun , and produtil.run.mpiserial functions, providing the implementation needed to run with LSF combined with the IBMPE MPI implementation. It may work with other MPI implementations connected to LSF, as long as they use mpirun.lsf to launch MPI programs.

Note
Unlike other MPI implementations, LSF does not allow changing of the number of MPI ranks used when running an MPI program. You can only run on all provided ranks, or one rank. Hence the TOTAL_TASKS variable used elsewhere in produtil, is ignored here.

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 ()
 Determines if LSF+IBMPE should be used to run MPI programs by looking for the mpirun.lsf program in $PATH.
 
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, logger=None, kwargs)
 Turns a produtil.mpiprog.MPIRanksBase tree into a produtil.prog.Runner. More...
 

Variables

tuple mpirun_lsf_path = produtil.fileop.find_exe('mpirun.lsf',raise_missing=False)
 Path to the mpirun.lsf program, or None if it isn't found. More...
 
tuple module_logger = logging.getLogger('lsf_cray_intel')
 

Function Documentation

def produtil.mpi_impl.mpirun_lsf.can_run_mpi ( )

Does this module represent an MPI implementation? Returns True.

Definition at line 52 of file mpirun_lsf.py.

def produtil.mpi_impl.mpirun_lsf.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 56 of file mpirun_lsf.py.

def produtil.mpi_impl.mpirun_lsf.mpirunner (   arg,
  allranks = False,
  logger = None,
  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
loggera logging.Logger for log messages
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
Note
LSF does not support modifying the number of MPI ranks to use when running a program. You can only use all provided ranks, or one rank.

Definition at line 63 of file mpirun_lsf.py.

def produtil.mpi_impl.mpirun_lsf.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 33 of file mpirun_lsf.py.

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

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

Definition at line 25 of file mpirun_lsf.py.

Variable Documentation

produtil.mpi_impl.mpirun_lsf.mpirun_lsf_path = produtil.fileop.find_exe('mpirun.lsf',raise_missing=False)

Path to the mpirun.lsf program, or None if it isn't found.

Definition at line 22 of file mpirun_lsf.py.