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

Adds Intel MPI support to produtil.run. More...

Detailed Description

Adds Intel MPI support to produtil.run.

This module is part of the produtil.mpi_impl package – see init.py for details. This implements the Intel MPI, but may work for other MPI implementations that use the "mpirun" command and OpenMP implementations that use the KMP_NUM_THREADS or OMP_NUM_THREADS environment variables.

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 Intel MPI is available. 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 mpirun_path = produtil.fileop.find_exe('mpirun',raise_missing=False)
 Path to the mpirun program, or None if it could not be found. More...
 
tuple module_logger = logging.getLogger('lsf_cray_intel')
 

Function Documentation

def produtil.mpi_impl.impi.can_run_mpi ( )

Does this module represent an MPI implementation? Returns True.

Definition at line 64 of file impi.py.

def produtil.mpi_impl.impi.detect ( )

Detects whether Intel MPI is available.

Definition at line 49 of file impi.py.

def produtil.mpi_impl.impi.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 68 of file impi.py.

def produtil.mpi_impl.impi.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 75 of file impi.py.

def produtil.mpi_impl.impi.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 34 of file impi.py.

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

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

Definition at line 26 of file impi.py.

Variable Documentation

produtil.mpi_impl.impi.mpirun_path = produtil.fileop.find_exe('mpirun',raise_missing=False)

Path to the mpirun program, or None if it could not be found.

Definition at line 22 of file impi.py.