Skip to content

Commit

Permalink
PICMI: warpx.numprocs (ECP-WarpX#4255)
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l authored Sep 1, 2023
1 parent 8e3d940 commit 01f69c6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Python/pywarpx/picmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,12 @@ class Simulation(picmistandard.PICMI_Simulation):
warpx_checkpoint_signals: list of strings
Signals on which to write out a checkpoint
warpx_numprocs: list of ints (1 in 1D, 2 in 2D, 3 in 3D)
Domain decomposition on the coarsest level.
The domain will be chopped into the exact number of pieces in each dimension as specified by this parameter.
https://warpx.readthedocs.io/en/latest/usage/parameters.html#distribution-across-mpi-ranks-and-parallelization
https://warpx.readthedocs.io/en/latest/usage/domain_decomposition.html#simple-method
"""

# Set the C++ WarpX interface (see _libwarpx.LibWarpX) as an extension to
Expand Down Expand Up @@ -1716,6 +1722,7 @@ def init(self, kw):

self.break_signals = kw.pop('warpx_break_signals', None)
self.checkpoint_signals = kw.pop('warpx_checkpoint_signals', None)
self.numprocs = kw.pop('warpx_numprocs', None)

self.inputs_initialized = False
self.warpx_initialized = False
Expand Down Expand Up @@ -1766,6 +1773,8 @@ def initialize_inputs(self):
pywarpx.warpx.break_signals = self.break_signals
pywarpx.warpx.checkpoint_signals = self.checkpoint_signals

pywarpx.warpx.numprocs = self.numprocs

particle_shape = self.particle_shape
for s in self.species:
if s.particle_shape is not None:
Expand Down

0 comments on commit 01f69c6

Please sign in to comment.