|
HWRF
trunk@4391
|
Represents a group of MPI programs, each of which have some number of ranks assigned. More...
Represents a group of MPI programs, each of which have some number of ranks assigned.
Definition at line 363 of file mpiprog.py.
Public Member Functions | |
| def | __init__ (self, args) |
| MPIRanksMPMD constructor. More... | |
| def | make_runners_immutable (self) |
| Tells each containing element to make its produtil.prog.Runners into produtil.prog.ImmutableRunners so that changes to them will not change the original. More... | |
| def | __repr__ (self) |
| Returns a pythonic description of this object. More... | |
| def | ngroups (self) |
| How many groups of identical repeated ranks are in this MPMD program? | |
| def | nranks (self) |
| How many ranks does this program request? | |
| def | groups |
| Iterates over tuples (rank,count) of groups of identical ranks. More... | |
| def | ranks (self) |
| Iterates over groups of repeated ranks returning the number of ranks each requests. More... | |
| def | __add__ (self, other) |
| Adds more ranks to this program. More... | |
| def | __radd__ (self, other) |
| Prepends more ranks to this program. More... | |
| def | __mul__ (self, factor) |
| Duplicates this MPMD program "factor" times. More... | |
| def | __rmul__ (self, factor) |
| Duplicates this MPMD program "factor" times. More... | |
| def | check_serial (self) |
| Checks to see if this program contains serial (non-MPI) or MPI components. More... | |
| def | get_logger (self) |
| Returns a logging.Logger for the first rank that has one. More... | |
Public Member Functions inherited from produtil.mpiprog.MPIRanksBase | |
| def | to_arglist |
| This is the underlying implementation of most of the mpi_impl modules, and hence make_runner as well. More... | |
| def | make_runners_immutable (self) |
| Returns a copy of this object where all child produtil.prog.Runner objects have been replaced with produtil.prog.ImmutableRunner objects. More... | |
| def | get_logger (self) |
| Returns a logger.Logger object for this MPIRanksBase or one from its child MPIRanksBase objects (if it has any). More... | |
| def | check_serial (self) |
| Returns a tuple (s,p) where s=True if there are serial ranks in this part of the MPI program, and p=True if there are parallel ranks. More... | |
| def | nranks (self) |
| Returns the number of ranks in this part of the MPI program. More... | |
| def | ranks (self) |
| Iterates over all MPIRank objects in this part of the MPI program. More... | |
| def | ngroups (self) |
| Returns the number of groups of repeated MPI ranks in the MPI program. More... | |
| def | groups |
| Iterates over all groups of repeating MPI ranks in the MPI program returning tuples (r,c) containing a rank r and the count (number) of that rank c. More... | |
| def | getthreads (self) |
| Returns the number of threads requested by this MPI rank, or by each MPI rank in this group of MPI ranks. More... | |
| def | setthreads (self, nthreads) |
| Sets the number of threads requested by each MPI rank within this group of MPI ranks. More... | |
| def | delthreads (self) |
| Removes the request for threads. More... | |
| def | __eq__ (self, other) |
| Returns True if this part of the MPI program is the same as another part. More... | |
| def | __mul__ (self, factor) |
| Returns a new set of MPI ranks that consist of this group of ranks repeated "factor" times. More... | |
| def | __rmul__ (self, other) |
| Returns a new set of MPI ranks that consist of this group of ranks repeated "factor" times. More... | |
| def | __add__ (self, other) |
| Returns a new set of MPI ranks that consist of this set of ranks with the "other" set appended. More... | |
| def | __radd__ (self, other) |
| Returns a new set of MPI ranks that consist of the "other" set of ranks with this set appended. More... | |
| def | isplainexe (self) |
| Determines if this set of MPI ranks can be represented by a single serial executable with a single set of arguments run without MPI. More... | |
| def | to_shell (self) |
| Returns a POSIX sh command that will execute the serial program, if possible, or raise a subclass of NotValidPosixSh otherwise. More... | |
| def | expand_iter |
| This is a wrapper around ranks() and groups() which will call self.groups() if expand=False. More... | |
| def | __repr__ (self) |
| Returns a string representation of this object intended for debugging. More... | |
| def produtil.mpiprog.MPIRanksMPMD.__init__ | ( | self, | |
| args | |||
| ) |
MPIRanksMPMD constructor.
| args | an array of MPIRanksBase to execute. |
Definition at line 366 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.__add__ | ( | self, | |
| other | |||
| ) |
Adds more ranks to this program.
| other | an MPIRanksMPMD or MPIRanksSPMD to add |
Definition at line 419 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.__mul__ | ( | self, | |
| factor | |||
| ) |
Duplicates this MPMD program "factor" times.
| factor | how many times to duplicate this program. |
Definition at line 435 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.__radd__ | ( | self, | |
| other | |||
| ) |
Prepends more ranks to this program.
| other | an MPIRanksMPMD or MPIRanksSPMD to prepend |
Definition at line 427 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.__repr__ | ( | self | ) |
Returns a pythonic description of this object.
Definition at line 378 of file mpiprog.py.
Referenced by produtil.prog.Runner.__str__().
| def produtil.mpiprog.MPIRanksMPMD.__rmul__ | ( | self, | |
| factor | |||
| ) |
Duplicates this MPMD program "factor" times.
| factor | how many times to duplicate this program. |
Definition at line 441 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.check_serial | ( | self | ) |
Checks to see if this program contains serial (non-MPI) or MPI components.
Definition at line 446 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.get_logger | ( | self | ) |
Returns a logging.Logger for the first rank that has one.
Definition at line 459 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.groups | ( | self, | |
threads = False |
|||
| ) |
Iterates over tuples (rank,count) of groups of identical ranks.
Definition at line 402 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.make_runners_immutable | ( | self | ) |
Tells each containing element to make its produtil.prog.Runners into produtil.prog.ImmutableRunners so that changes to them will not change the original.
Definition at line 373 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksMPMD.ranks | ( | self | ) |
Iterates over groups of repeated ranks returning the number of ranks each requests.
Definition at line 413 of file mpiprog.py.
1.8.10