petsc4py.PETSc.Sys#
- class petsc4py.PETSc.Sys#
Bases:
object
System utilities.
Methods Summary
Print
(*args[, sep, end, comm])Print output from the first processor of a communicator.
Get the default MPI communicator used to create PETSc objects.
getVersion
([devel, date, author])Return PETSc version information.
Return PETSc version information.
hasExternalPackage
(package)Return whether PETSc has support for external package.
infoAllow
(flag[, filename, mode])Enables or disables PETSc info messages.
Return whether PETSc has been finalized.
Return whether PETSc has been initialized.
Remove the current error handler.
Remove the current signal handler.
pushErrorHandler
(errhandler)Set the current error handler.
registerCitation
(citation)Register BibTeX citation.
setDefaultComm
(comm)Set the default MPI communicator used to create PETSc objects.
sleep
([seconds])Sleep some number of seconds.
splitOwnership
(size[, bsize, comm])Given a global (or local) size determines a local (or global) size.
syncFlush
([comm])Flush output from previous
syncPrint
calls.syncPrint
(*args[, sep, end, flush, comm])Print synchronized output from several processors of a communicator.
Methods Documentation
- classmethod Print(*args, sep=' ', end='\n', comm=None, **kwargs)#
Print output from the first processor of a communicator.
Collective.
- Parameters:
- Return type:
See also
- classmethod getDefaultComm()#
Get the default MPI communicator used to create PETSc objects.
Not collective.
See also
Source code at petsc4py/PETSc/Sys.pyx:116
- Return type:
- classmethod getVersion(devel=False, date=False, author=False)#
Return PETSc version information.
Not collective.
- Parameters:
- Returns:
- Return type:
See also
- classmethod getVersionInfo()#
Return PETSc version information.
Not collective.
- Returns:
info – Dictionary with version information.
- Return type:
See also
- classmethod hasExternalPackage(package)#
Return whether PETSc has support for external package.
Not collective.
See also
- classmethod infoAllow(flag, filename=None, mode='w')#
Enables or disables PETSc info messages.
Not collective.
- Parameters:
- Return type:
See also
- classmethod isFinalized()#
Return whether PETSc has been finalized.
Not collective.
See also
Source code at petsc4py/PETSc/Sys.pyx:101
- Return type:
- classmethod isInitialized()#
Return whether PETSc has been initialized.
Not collective.
See also
Source code at petsc4py/PETSc/Sys.pyx:88
- Return type:
- classmethod popErrorHandler()#
Remove the current error handler.
Logically collective.
See also
Source code at petsc4py/PETSc/Sys.pyx:366
- Return type:
- classmethod popSignalHandler()#
Remove the current signal handler.
Logically collective.
See also
Source code at petsc4py/PETSc/Sys.pyx:379
- Return type:
- classmethod pushErrorHandler(errhandler)#
Set the current error handler.
Logically collective.
See also
- classmethod registerCitation(citation)#
Register BibTeX citation.
Not collective.
See also
- classmethod setDefaultComm(comm)#
Set the default MPI communicator used to create PETSc objects.
Logically collective.
- Parameters:
comm (Comm | None) – MPI communicator. If set to
None
, usesCOMM_WORLD
.- Return type:
See also
- classmethod sleep(seconds=1.0)#
Sleep some number of seconds.
Not collective.
See also
- classmethod splitOwnership(size, bsize=None, comm=None)#
Given a global (or local) size determines a local (or global) size.
Collective.
- Parameters:
- Returns:
- Return type:
Notes
The
size
argument corresponds to the full size of the vector. That is, an array with 10 blocks and a block size of 3 will have asize
of 30, not 10.See also
- classmethod syncFlush(comm=None)#
Flush output from previous
syncPrint
calls.Collective.
- Parameters:
comm (Comm | None) – MPI communicator, defaults to
getDefaultComm
.- Return type:
- classmethod syncPrint(*args, sep=' ', end='\n', flush=False, comm=None, **kwargs)#
Print synchronized output from several processors of a communicator.
Not collective.