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

Adds SGI MPT support to produtil.run. More...

Detailed Description

Adds SGI MPT 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 the SGI MPT MPI implementation.

Warning
This module assumes the TOTAL_TASKS environment variable is set to the maximum number of MPI ranks the program has available to it. That is used when the mpirunner is called with the allranks=True option.

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 SGI MPT is available by looking for mpiexec_mpt. More...
 
def guess_nthreads (default)
 Tries to guess the number of threads in use. 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...
 

Variables

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

Function Documentation

def produtil.mpi_impl.mpiexec_mpt.can_run_mpi ( )

Does this module represent an MPI implementation? Returns True.

Definition at line 61 of file mpiexec_mpt.py.

def produtil.mpi_impl.mpiexec_mpt.detect ( )

Detects whether the SGI MPT is available by looking for mpiexec_mpt.

Definition at line 46 of file mpiexec_mpt.py.

def produtil.mpi_impl.mpiexec_mpt.guess_nthreads (   default)

Tries to guess the number of threads in use.

Parameters
defaultthe value to return if the function cannot guess

Definition at line 50 of file mpiexec_mpt.py.

def produtil.mpi_impl.mpiexec_mpt.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 65 of file mpiexec_mpt.py.

def produtil.mpi_impl.mpiexec_mpt.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
Warning
Assumes the TOTAL_TASKS environment variable is set if allranks=True

Definition at line 72 of file mpiexec_mpt.py.

def produtil.mpi_impl.mpiexec_mpt.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 32 of file mpiexec_mpt.py.

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

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

Definition at line 24 of file mpiexec_mpt.py.

Variable Documentation

produtil.mpi_impl.mpiexec_mpt.mpiexec_mpt_path = produtil.fileop.find_exe('mpiexec_mpt',raise_missing=False)

Path to the mpiexec_mpt program.

Definition at line 21 of file mpiexec_mpt.py.