diff options
author | 2021-12-16 10:12:57 -0800 | |
---|---|---|
committer | 2021-12-16 10:12:57 -0800 | |
commit | 746ddc2ae871e70cd50940c2cca03a17a9b7ec1a (patch) | |
tree | 37ba15e42ada9f89378894156214ab7b05699e66 /Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py | |
parent | b0b03f6bc5e7768c4ecbcb4e4a2c505d9e4aad91 (diff) | |
download | WarpX-746ddc2ae871e70cd50940c2cca03a17a9b7ec1a.tar.gz WarpX-746ddc2ae871e70cd50940c2cca03a17a9b7ec1a.tar.zst WarpX-746ddc2ae871e70cd50940c2cca03a17a9b7ec1a.zip |
Wrap shared object in a class to control its loading (#2637)
* Wrap shared object in a class to control its loading
* Fix libwarpx attribute references
* Updated callbacks.py for updated libwarpx
* Removed the wx module plus other clean up
* Further revision of how to use the pywarpx module.
Now, _libwarpx should not be imported by external scripts except in special circumstances.
* Updated documentation
* Clean up end of line whitespace
* Added more wrapping routines plus some clean up
* Fixed use of pywarpx in two examples
* Fix for getistep
* Fixed for the EB Python interface
* Silence a warning for our wrapper
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py')
-rwxr-xr-x | Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py b/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py index 0d87699c5..540766152 100755 --- a/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py +++ b/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py @@ -6,6 +6,7 @@ # --- if the correct amount of processors are initialized in AMReX. from mpi4py import MPI +import pywarpx from pywarpx import picmi constants = picmi.constants @@ -124,18 +125,16 @@ sim.step(max_steps, mpi_comm=new_comm) comm_world_size = comm_world.size new_comm_size = new_comm.size -from pywarpx import wx - if color == 0: # verify that communicator contains correct number of procs (1) - assert wx.libwarpx.warpx_getNProcs() == comm_world_size - 1 - assert wx.libwarpx.warpx_getNProcs() == new_comm_size + assert pywarpx.getNProcs() == comm_world_size - 1 + assert pywarpx.getNProcs() == new_comm_size else: # verify that amrex initialized with 1 fewer proc than comm world - assert wx.libwarpx.warpx_getNProcs() == comm_world_size - 1 - assert wx.libwarpx.warpx_getNProcs() == new_comm_size + assert pywarpx.getNProcs() == comm_world_size - 1 + assert pywarpx.getNProcs() == new_comm_size # verify that amrex proc ranks are offset by -1 from # world comm proc ranks - assert wx.libwarpx.warpx_getMyProc() == rank - 1 + assert pywarpx.getMyProc() == rank - 1 |