U  g@sddlZddlZddlZddlZedZGdddeZGdddeZGdddeZ Gd d d eZ Gd d d eZ Gd ddeZ GdddeZ GdddeZdS)Nzprodutil.mpi_implc@seZdZdZdS)MPIConfigErrorz,!Base class of MPI configuration exceptions.N__name__ __module__ __qualname____doc__rrL/lfs/h1/ops/prod/packages/hmon.v3.2.7/ush/produtil/mpi_impl/mpi_impl_base.pyrsrc@seZdZdZdS)WrongMPIz@!Unused: raised when the wrong MPI implementation is accessed. Nrrrrr r sr c@seZdZdZdS)MPISerialMissingz?!Raised when the mpiserial program is required, but is missing.Nrrrrr r sr c@seZdZdZdS)MPIAllRanksErrorz!Raised when the allranks=True keyword is sent to mpirun or mpirunner, but the MPI program specification has more than one rank.Nrrrrr r sr c@seZdZdZdS)MPIMixedz]!Thrown to indicate serial and parallel processes are being mixed in a single mpi_comm_world.Nrrrrr r sr c@seZdZdZdS) MPIDisabledz !Thrown to MPI is not supported.Nrrrrr rsrc@seZdZdZdS)OpenMPDisabledzC!Raised when OpenMP is not supported by the present implementation.Nrrrrr rsrc@s,eZdZdZd ddZddZd d d ZdS) CMDFGena!Generates files with one line per MPI rank, telling what program to run on each rank. This class is used to generate command files for mpiserial, poe or mpirun.lsf. Command files are files with one MPI rank per line containing a shell command to run for that rank. Generally the input (lines) is generated by the to_arglist function in a subclass of produtil.mpiprog.MPIRanksBase. See the produtil.mpi_impl.mpirun_lsf for an example of how to use this. SCR_CMDFILENFcKs|dk s tt|tstt|dks*tt|dtsr;logging getLoggerr2 Exceptionrr r r r rrobjectrrrrr s