|
HWRF
trunk@4391
|
Represents one MPI program duplicated across many ranks. More...
Represents one MPI program duplicated across many ranks.
Definition at line 277 of file mpiprog.py.
Public Member Functions | |
| def | __init__ (self, mpirank, count) |
| MPIRanksSPMD constructor. More... | |
| def | make_runners_immutable (self) |
| Returns a new MPIRanksSPMD with an immutable version of self._mpirank. More... | |
| def | __repr__ (self) |
| Returns "X*N" where X is the MPI program and N is the number of ranks. More... | |
| def | ngroups (self) |
| Returns 1 or 0: 1 if there are ranks and 0 if there are none. More... | |
| def | groups |
| Yields a tuple (X,N) where X is the mpi program and N is the number of ranks. More... | |
| def | copy (self) |
| Returns a deep copy of self. More... | |
| def | ranks (self) |
| Iterates over MPI ranks within self. More... | |
| def | nranks (self) |
| Returns the number of ranks this program requests. More... | |
| def | __mul__ (self, factor) |
| Multiply the number of requested ranks by some factor. More... | |
| def | __rmul__ (self, factor) |
| Multiply the number of requested ranks by some factor. More... | |
| def | __add__ (self, other) |
| Add some new ranks to self. More... | |
| def | check_serial (self) |
| Checks to see if this program contains serial (non-MPI) or MPI components. More... | |
| def | get_logger (self) |
| Returns my MPI program's logger. 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.MPIRanksSPMD.__init__ | ( | self, | |
| mpirank, | |||
| count | |||
| ) |
MPIRanksSPMD constructor.
| mpirank | the program to run |
| count | how many times to run it |
Definition at line 279 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.__add__ | ( | self, | |
| other | |||
| ) |
Add some new ranks to self.
If they are not identical to the MPI program presently requested, this returns a new MPIRanksMPMD.
Definition at line 332 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.__mul__ | ( | self, | |
| factor | |||
| ) |
Multiply the number of requested ranks by some factor.
Definition at line 322 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.__repr__ | ( | self | ) |
Returns "X*N" where X is the MPI program and N is the number of ranks.
Definition at line 291 of file mpiprog.py.
Referenced by produtil.prog.Runner.__str__().
| def produtil.mpiprog.MPIRanksSPMD.__rmul__ | ( | self, | |
| factor | |||
| ) |
Multiply the number of requested ranks by some factor.
Definition at line 327 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.check_serial | ( | self | ) |
Checks to see if this program contains serial (non-MPI) or MPI components.
Definition at line 346 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.copy | ( | self | ) |
Returns a deep copy of self.
Definition at line 308 of file mpiprog.py.
Referenced by produtil.mpiprog.MPIRanksSPMD.__add__(), produtil.mpiprog.MPIRank.__add__(), produtil.mpiprog.MPIRank.__getitem__(), and produtil.prog.ImmutableRunner.runner().
| def produtil.mpiprog.MPIRanksSPMD.get_logger | ( | self | ) |
Returns my MPI program's logger.
Definition at line 357 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.groups | ( | self, | |
threads = False |
|||
| ) |
Yields a tuple (X,N) where X is the mpi program and N is the number of ranks.
Definition at line 301 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.make_runners_immutable | ( | self | ) |
Returns a new MPIRanksSPMD with an immutable version of self._mpirank.
Definition at line 287 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.ngroups | ( | self | ) |
Returns 1 or 0: 1 if there are ranks and 0 if there are none.
Definition at line 295 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.nranks | ( | self | ) |
Returns the number of ranks this program requests.
Definition at line 316 of file mpiprog.py.
| def produtil.mpiprog.MPIRanksSPMD.ranks | ( | self | ) |
Iterates over MPI ranks within self.
Definition at line 311 of file mpiprog.py.
1.8.10