Git Product home page Git Product logo

Comments (2)

archermarx avatar archermarx commented on July 18, 2024

Update: I installed AMReX and pyAMReX seperately, so python can find those now, but I still get the following error upon trying to run the 1D benchmark

Traceback (most recent call last):
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/_libwarpx.py", line 90, in load_library
    from . import warpx_pybind_1d as cxx_1d
ImportError: cannot import name 'warpx_pybind_1d' from 'pywarpx' (/home/marksta/.local/lib/python3.10/site-packages/pywarpx/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/gpfs/accounts/goroda_root/goroda0/marksta/warpx/benchmark-1d/1d.py", line 399, in <module>
    run.run_sim()
  File "/gpfs/accounts/goroda_root/goroda0/marksta/warpx/benchmark-1d/1d.py", line 355, in run_sim
    self.sim.step(self.max_steps - self.diag_steps)
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/picmi.py", line 1924, in step
    self.initialize_warpx(mpi_comm)
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/picmi.py", line 1916, in initialize_warpx
    pywarpx.warpx.init(mpi_comm, max_step=self.max_steps, stop_time=self.max_time)
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/WarpX.py", line 98, in init
    libwarpx.initialize(argv, mpi_comm=mpi_comm)
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/_libwarpx.py", line 128, in initialize
    self.amrex_init(argv, mpi_comm)
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/_libwarpx.py", line 118, in amrex_init
    self.libwarpx_so.amrex_init(argv)
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/_libwarpx.py", line 42, in __getattr__
    self.load_library()
  File "/home/marksta/.local/lib/python3.10/site-packages/pywarpx/_libwarpx.py", line 112, in load_library
    raise Exception(f"Dimensionality '{self.geometry_dim}' was not compiled in this Python install. Please recompile with -DWarpX_DIMS={_dims}")
Exception: Dimensionality '1d' was not compiled in this Python install. Please recompile with -DWarpX_DIMS=1

This is pyWarpX installed using the SLURM script in the first post. It seems the environment variables aren't working correctly?

from warpx.

archermarx avatar archermarx commented on July 18, 2024

Ok, I have gotten it installed and running, but I am encountering issues running with OpenMP and MPI.

First, when running with one MPI rank and only one grid, everything works fine. However, when using two or more grids, the code will run fine for a while and then begin to hang or take a second or more per iteration. This makes it impossible to complete even quite small simulations.

Second, if I run with mpirun -n 2, the code crashes while writing the first openpmd file with the following output:

MPI initialized with 2 MPI processes
MPI initialized with thread support level 3
OMP initialized with 1 OMP threads
AMReX (23.10-14-g7ee29121ed70) initialized
PICSAR (23.09)
WarpX (23.10-19-g8459109a725b)

    __        __             __  __
    \ \      / /_ _ _ __ _ __\ \/ /
     \ \ /\ / / _` | '__| '_ \\  /
      \ V  V / (_| | |  | |_) /  \
       \_/\_/ \__,_|_|  | .__/_/\_\
                        |_|

Level 0: dt = 1.485333333e-11 ; dz = 7.426666667e-05

Grids Summary:
  Level 0   15 grids  600 cells  100 % of domain
            smallest grid: 40  biggest grid: 40

-------------------------------------------------------------------------------
--------------------------- MAIN EM PIC PARAMETERS ----------------------------
-------------------------------------------------------------------------------
Precision:            | DOUBLE
Particle precision:   | DOUBLE
Geometry:             | 1D (Z)
Operation mode:       | Electrostatic
                      | - laboratory frame
                      | - vacuum
-------------------------------------------------------------------------------
Current Deposition:   | direct
Particle Pusher:      | Boris
Charge Deposition:    | standard
Field Gathering:      | energy-conserving
Particle Shape Factor:| 3
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
For full input parameters, see the file: warpx_used_inputs

--- INFO    : Writing openPMD file diags/openpmd000000
[marksta@gl-login3 ecdi-1d-unbounded]$ cat error.log
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unknown file format! Did you specify a file ending?
SIGABRT
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unknown file format! Did you specify a file ending?
SIGABRT
See Backtrace.1.0 file for details
See Backtrace.0.0 file for details

Note that I have installed with openpmd support. I've attached the input file I used as well as the backtrace file and slurm script.

As an example of what I mean, here's a profiler output from when it's running well (here 16 grids)

STEP 11477 starts ...
STEP 11477 ends. TIME = 2.992538086e-08 DT = 2.607421875e-12
Evolve time = 90.40318536 s; This step = 0.004930898 s; Avg. per step = 0.007876900354 s

And here's from later in the simulation when it slows to a crawl

STEP 22003 starts ...
STEP 22003 ends. TIME = 5.737110352e-08 DT = 2.607421875e-12
Evolve time = 244.2563833 s; This step = 1.05330376 s; Avg. per step = 0.0111010491 s

Backtrace.0.0.txt
Backtrace.1.0.txt
srun.sh.txt
inputs_1d.txt

from warpx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.