aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-28AMReX: Weekly Update (#4243)Gravatar Axel Huebl 5-5/+5
2023-08-28Work-Around: Segfault in MPI_Init with HIP (#4237)Gravatar Axel Huebl 2-3/+22
* Work-Around: Segfault in MPI_Init with HIP See: https://docs.olcf.ornl.gov/systems/crusher_quick_start_guide.html#olcfdev-1655-occasional-seg-fault-during-mpi-init * Move to ABLASTR All that counts is that HIP is initialized before GPU-aware MPI. * Add Exception
2023-08-28Cleaning: Explicit Capture in Copy Lambda (#4238)Gravatar Axel Huebl 2-2/+6
In the spirit of a recent nvcc compiler bug, simplify the capture logic from implicit to explicit for the particle filter lambda.
2023-08-28Remove AddToMultiFabMap functions from WarpX class (#4242)Gravatar Luca Fedeli 2-23/+3
* Remove AddToMultiFabMap functions from WarpX class * fixed bug
2023-08-27remove unnecessary static variables from WarpX.H (#4239)Gravatar Luca Fedeli 3-22/+12
2023-08-26Frontier (OLCF): MPI_Waitall issues (#4235)Gravatar Axel Huebl 3-0/+31
* Frontier (OLCF): MPI_Waitall issues Document to use `export MPICH_SMP_SINGLE_COPY_MODE=NONE` in job scripts. According to earlier attempts by Marco, this might not yet solve the issue, but it is the documented workaround from the OLCF side so far, so we should add it for now. * Comments in LUMI Submission Template
2023-08-25Doc: HPC Python Separate (Static/Shared AMReX) (#4226)Gravatar Axel Huebl 18-77/+132
* Doc: HPC Python Separate Currently, due to global variables used in AMReX to store implicit state instead of using handlers, we cannot build shared libraries for Python (pyAMReX + pyWarpX + pyImpactX) with a *static* `libamrex_Nd.a`. Thus, we automatically build a shared AMReX library in our superbuild the moment that we need Python bindings. That can confuse people that just use the C++ application with AMReX inputs files, which then also depends on this shared AMReX library (which also needs to be copied around, for instance). This update the HPC docs to just build App and bindings twice (twice the time spent), to work around this current limitation of AMReX. * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Docs: Update other cluster descriptions as well. * Install Dependencies: `git fetch --prune` Fix an issue first seen in blaspp/lapackpp where fetch failed because an unused remote branch was gone. --------- Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2023-08-25Do not pre-processing routine in Python initialization (#4231)Gravatar Remi Lehe 2-10/+0
2023-08-25Fix: openPMD 1D/2D3V Constant Positions (#4227)Gravatar Axel Huebl 1-13/+33
Add constant record components for position and positionOffset in 1D3V and 2D3V simulations. Follows our conventions in https://warpx.readthedocs.io/en/latest/developers/dimensionality.html#conventions and simplifies post-processing, e.g., emittance calculations.
2023-08-24Fix: WarpX Version (#4218)Gravatar Axel Huebl 5-14/+27
* Fix: WarpX Version Fix the WarpX version info. * Fix Version: pyWarpX * Version: More Python __version__
2023-08-24CI: Shrink NVHPC Size (#4224)Gravatar Axel Huebl 2-10/+14
* CI: Shrink NVHPC Size Try to shrink the size occupied in the NVHPC CI runs. Currently running out-of-disk... * NVHPC: Thin out Install - remove profilers (big) - remove static libs (big) - remove examples (small)
2023-08-24Fix Python wrapper to extract `theta` (#4229)Gravatar Remi Lehe 1-3/+3
2023-08-24fix pc for BTD plotfile (#4228)Gravatar Revathi Jambunathan 1-8/+8
2023-08-24Fix Repeated Plasma Lens: Start (#4220)Gravatar Axel Huebl 2-23/+31
* Fix Repeated Plasma Lens: Start The current implementation has problems finding the right index of the current plasma lens if: - the lens started before z=0 - the lens did not start between z=0...first-period This should fix it. * Document Start, Define an End
2023-08-24add error message if cuda 11.6 is used with the yee solver (#4222)Gravatar aveksler1 1-0/+10
2023-08-22Use only 8 cores to compile on Summit (#4195)Gravatar Remi Lehe 1-2/+2
2023-08-22BTD RZ test: add missing checksum analysis (#4202)Gravatar Edoardo Zoni 2-0/+25
* BTD RZ test: add missing checksum analysis * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-22 BoxArray in BTD has single box (#4208)Gravatar Revathi Jambunathan 5-20/+15
* BoxArray in BTD has single box * cleaning to remove all instances of max_box_size * Assert BA size to be 1 for BTD and fix an inline comment * fix typo
2023-08-22CMake: Fix `-fPIC` logic that triggers shared AMReX (#4211)Gravatar Axel Huebl 2-5/+9
Accidentially now always built AMReX was shared library, which is only needed if we build with Python.
2023-08-22fix undefined behavior in btd intervals (#4216)Gravatar Ryan Sandberg 1-14/+30
2023-08-22Remove unused/untested Python file (#4217)Gravatar Remi Lehe 2-145/+0
* Remove unused/untested Python file * Remove additional file
2023-08-22add flush (#4214)Gravatar Ilian Kara-Mostefa 1-4/+8
2023-08-22correct zinject_plane_boost (#4213)Gravatar Ilian Kara-Mostefa 1-1/+1
2023-08-22Hybrid grid type not implemented in RZ geometry (#4212)Gravatar Edoardo Zoni 2-0/+7
2023-08-21CI: Sphinx <7.2 for now (#4215)Gravatar Axel Huebl 1-1/+3
Because breathe is not yet ready.
2023-08-22pyWarpX.H: Add Include Guard (#4206)Gravatar Axel Huebl 1-0/+5
Add an include guard to this header file.
2023-08-21AMReX: Weekly Update (#4207)Gravatar Axel Huebl 5-5/+5
2023-08-21Add GPU-to-CPU mapping for Frontier (#4205)Gravatar Marco Garten 1-5/+6
Frontier uses a Low-noise Mode Layout for its nodes which pins system processes via the default core specification `-S 8` to the first core every L3 region.
2023-08-21Affiliation update in Zenodo file (#4204)Gravatar Arianna Formenti 1-0/+5
2023-08-20Include `J` in diagnostic output when an electromagnetic solver is not used ↵Gravatar Roelof Groenewald 19-121/+239
(#4116) * include current density in diagnostic output even if an electromagnetic solver is not used * do not redeposit current for the magnetostatic solver * update CI benchmarks for tests that previously did not register current density * fix remaining failing CI test * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * do not output current density in collision tests * update `JFunctor` constructor doc-string * code cleanup - reduce code duplication * specify `Ex Ey Ez Bx By Bz` fields to plot for collision CI tests * specify `Er Et Ez Br Bt Bz` as output for rz collision test * rename `InterpolateToDst` to `InterpolateMFForDiag` * only deposit current density once per diagnostic output (if not already deposited) * write deposited current for all directions into `current_fp` during diagnostic step deposition * use `amrex::make_alias` to directly deposit current density into `warpx.current_fp` during diagnostic step deposition * add class variable `solver_deposits_current` to `FullDiagnostics` so that there is only one place where the determination is made whether current should be deposited during diagnostic output * correct logic to determine `m_solver_deposits_current` --------- Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2023-08-19Fix: Remove Overly Exported Classes (#4200)Gravatar Axel Huebl 5-10/+5
* Fix: Remove Overly Exported Classes Luckily, many of them should not contain global state. * Add Missing WarpX.H Include
2023-08-17Add nodal electrostatic solver (#3982)Gravatar Arianna Formenti 6-113/+414
* added nodal electrostatic solver * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * sphere test for electrostatic nodal solver * add 3d single bunch test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adds single bunch ci test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updated tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updated checksums nodal electrostatic * Improve readability * Change `assert` condition * Clean up --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2023-08-17Electrostatic sphere tests: add missing checksum analysis (#4198)Gravatar Edoardo Zoni 4-20/+53
2023-08-17Automated test for externally loaded fields in the boosted frame (#4188)Gravatar Ilian Kara-Mostefa 5-1/+238
* Implement boosted frame automated test (1D) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implement boosted frame automated test (1D) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * time_chunk_size=50 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2023-08-16Cleanup plasma injection (#4191)Gravatar David Grote 3-373/+426
* Extensive clean up of PlasmaInjection * Small cleanup of parseMomentum * Fix string argument reference * Remove unneeded surface_flux
2023-08-16fix time update (#4184)Gravatar Ilian Kara-Mostefa 1-1/+1
2023-08-15Update Python installation instructions on HPC (#4189)Gravatar Remi Lehe 10-21/+16
* Update Python installation instructions on HPC * Update Python installation instructions on HPC --------- Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2023-08-15affiliation update in Zenodo file (#4190)Gravatar Roelof Groenewald 1-1/+1
2023-08-16Docs: HPC3 (UCI) with Only `-j 12` (#4182)Gravatar Axel Huebl 2-6/+6
We use too many cores when we compile and thus get our compile processes killed by the system. Let's use a bit less to stay in the limits.
2023-08-15[pre-commit.ci] pre-commit autoupdate (#4186)Gravatar pre-commit-ci[bot] 1-2/+2
updates: - [github.com/Lucas-C/pre-commit-hooks: v1.5.3 → v1.5.4](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.3...v1.5.4) - [github.com/hadialqattan/pycln: v2.2.1 → v2.2.2](https://github.com/hadialqattan/pycln/compare/v2.2.1...v2.2.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-14AMReX: Weekly Update (#4183)Gravatar Axel Huebl 5-5/+5
2023-08-14t_lab optionally imposed for externally loaded species in the boosted frame ↵Gravatar Ilian Kara-Mostefa 3-5/+15
(#4153) * added guidelines * added impose t_lab from file as an option * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removed unused comment * fixed unconsistent variable type * removed space * rearranged code changes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-14Python 3.8+ (#4173)Gravatar Axel Huebl 5-6/+6
Python 3.7 went EOL last month. Time to bump up our supported versions to 3.8+ as well.
2023-08-14Clang-tidy: add more misc-* checks to clang-tidy CI test (#4170)Gravatar Luca Fedeli 6-8/+4
* Clang-tidy: add more misc-* checks to clang-tidy CI test * address issues found with clang-tidy
2023-08-12Transition to pyAMReX (#3474)Gravatar Axel Huebl 100-5375/+3139
* pyAMReX: Build System * CI Updates (Changed Options) * Callback modernization (#4) * refactor callbacks.py * added binding code in `pyWarpX.cpp` to add or remove keys from the callback dictionary * minor PR cleanups Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Added Python level reference to fetch the multifabs (#3) * pyAMReX: Build System * Added Python level reference to Ex_aux * Now uses the multifab map * Fix typo Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Add initialization and finalize routines (#5) A basic PICMI input file will now run to completion. * Regression Tests: WarpX_PYTHON=ON * Update Imports to nD pyAMReX * IPO/LTO Control Although pybind11 relies heavily on IPO/LTO to create low-latency, small-binary bindings, some compilers will have troubles with that. Thus, we add a compile-time option to optionally disable it when needed. * Fix: Link Legacy WarpXWrappers.cpp * Wrap WarpX instance and start multi particle container * Fix test Python_pass_mpi_comm * Start wrapper for multiparticle container * Add return policy Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update fields to use MultiFabs directly Remove EOL white space Removed old routines accessing MultiFabs Update to use "node_centered" * Fix compilation with Python * Update fields.py to use modified MultiFab tag names * Remove incorrect, unused code * Add function to extract the WarpX MultiParticleContainer * Complete class WarpXParticleContainer * Wrap functions getNprocs / getMyProc * restore `install___` callback API - could remove later if we want but should maintain backward compatibility for now * add `gett_new` and `getistep` functions wrappers; fix typos in `callbacks.py`; avoid error in getting `rho` from `fields.py` * Update callback call and `getNproc`/`getMyProc` function * Replace function add_n_particles * Fix setitem in fields.py for 1d and 2d * also update `gett_new()` in `_libwarpx.py` in case we want to keep that API * added binding for `WarpXParIter` - needed to port `libwarpx.depositChargeDensity()` which is an ongoing effort * Wrap function num_real_comp * added binding for `TotalNumberOfParticles` and continue progress on enabling 1d MCC test to run * add `SyncRho()` binding and create helper function in `libwarpx.depositChargeDensity` to manage scope of the particle iter * Clean up issues in fields.py * update bindings for `get_particle_structs` * Fix setitem in fields.py * switch order of initialization for particle container and particle iterator * switch deposit_charge loop to C++ code; bind `ApplyInverseVolumeScalingToChargeDensity` * move `WarpXParticleContainer.cpp` and `MultiParticleContainer.cpp` to new Particles folder * added binding for `ParticleBoundaryBuffer` * More fixes for fields.py * Fix: Backtraces from Python Add the Python executable name with an absolute path, so backtraces in AMReX work. See linked AMReX issue for details. * Cleaning * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix: Backtraces from Python Part II Do not add Python script name - it confuses the AMReX ParmParser to build its table. * Fix: CMake Dependencies for Wheel This fixes a racecondition during `pip_install`: it was possible that not all dimensions where yet build from pybind before we start packing them in the wheel for pip install. * MCC Test: Install Callbacks before Run Otherwise hangs in aquiring the gil during shutdown. * addition of `Python/pywarpx/particle_containers.py` and various associated bindings * Fix: CMake Superbuild w/ Shared AMReX We MUST build AMReX as a shared (so/dll/dylib) library, otherwise all the global state in it will cause split-brain situations, where our Python modules operate on different stacks. * add `clear_all()` to callbacks in order to remove all callbacks at finalize * add `-DWarpX_PYTHON=ON` to CI tests that failed to build * add `get_comp_index` and continue to port particle data bindings * Add AMReX Module as `libwarpx_so.amr` Attribute to pass through the already loaded AMReX module with the matching dimensionality to the simulation. * Fix for fields accounting for guard cells * Fix handling of ghost cells in fields * Update & Test: Particle Boundary Scraping * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * CI: Python Updates - modernize Python setups - drop CUDA 11.0 for good and go 11.3+ as documented already ``` Error #3246: Internal Compiler Error (codegen): "there was an error in verifying the lgenfe output!" ``` * CI: Python Updates (chmod) * Add support for cupy in fields.py * Add MultiFab reduction routines * CI: CUDA 11.3 is <= Ubuntu 20.04 * changed `AddNParticles` to take `amrex::Vector` arguments * setup.py: WarpX_PYTHON=ON * update various 2d and rz tests with new APIs * add `-DWarpX_PYTHON_IPO=OFF` to compile string for 2d and 3d Python CI tests to speed up linking * CI: -DpyAMReX_IPO=OFF * CI: -DpyAMReX_IPO=OFF actually adding `=OFF` * CI: Intel Python * CI: macOS Python Executable Ensure we always use the same `python3` executable, as specified by the `PATH` priority. * CMake: Python Multi-Config Build Add support for multi-config generators, especially on Windows. * __init__.py: Windows DLL Support Python 3.8+ on Windows: DLL search paths for dependent shared libraries Refs.: - https://github.com/python/cpython/issues/80266 - https://docs.python.org/3.8/library/os.html#os.add_dll_directory * CI: pywarpx Update our setup.py cannot install pyamrex yet as a dependency. * ABLASTR: `ablastr/export.H` Add a new header to export public globals that are not covered by `WINDOWS_EXPORT_ALL_SYMBOLS`. https://stackoverflow.com/questions/54560832/cmake-windows-export-all-symbols-does-not-cover-global-variables/54568678#54568678 * WarpX: EXPORT Globals in `.dll` files WarpX still uses a lot of globals: - `static` member variables - `extern` global variables These globals cannot be auto-exported with CMake's `WINDOWS_EXPORT_ALL_SYMBOLS` helper and thus we need to mark them manually for DLL export (and import) via the new ABLASTR `ablastr/export.H` helper macros. This starts to export symbols in the: - WarpX and particle container classes - callback hook database map - ES solver * CI: pywarpx Clang CXXFLAGS Down Move CXXFLAGS (`-Werror ...`) down until deps are installed. * GNUmake: Generate `ablastr/export.H` * CMake: More Symbol Exports for Windows * `WarpX-tests.ini`: Simplify Python no-IPO Also avoids subtle differences in compilation that increase compile time. * Update PICMI_inputs_EB_API.py for embedded_boundary_python_API CI test * Fix Python_magnetostatic_eb_3d * Update: Python_restart_runtime_components New Python APIs * Windows: no dllimport for now * CI: Skip `PYINSTALLOPTIONS` For Now * CMake: Dependency Bump Min-Versions for external packages picked up by `find_package`. * Fix F and G_fp names in fields.py * Tests: Disable `Python_pass_mpi_comm` * Wrappers: Cleanup * pyWarpX: Include Cleaning * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fields.py: Fix F and G Wrappers Correct MultiFab names (w/o components). * Remove unused in fields.py * Windows: New Export Headers - ABLASTR: `ablastr/export.H` - WarpX: `Utils/export.H` * removed `WarpInterface.py` since that functionality is now in `particle_containers.py`; removed parts of `WarpXWrappers.cpp` that have been ported to pyamrex * CMake: Link OBJECT Target PRIVATE * CMake: Remove OBJECT Target Simplify and make `app` link `lib` (default: static). Remove OBJECT target. * Fix in fields.py for the components index * Update get_particle_id/cpu As implemented in pyAMReX with https://github.com/AMReX-Codes/pyamrex/pull/165 * WarpX: Update for Private Constructor * Import AMReX Before pyd DLL Call Importing AMReX will add the `add_dll_directory` to a potentially shared amrex DLL on Windows. * Windows CI: Set PATH to amrex_Nd.dll * CMake: AMReX_INSTALL After Python In superbuild, Python can modify `AMReX_BUILD_SHARED_LIBS`. * Clang Win CI: Manually Install requirements Sporadic error is: ``` ... Installing collected packages: pyparsing, numpy, scipy, periodictable, picmistandard ERROR: Could not install packages due to an OSError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\hostedtoolcache\\windows\\Python\\3.11.4\\x64\\Lib\\site-packages\\numpy\\polynomial\\__init__.py' Consider using the `--user` option or check the permissions. ``` * Hopefully final fixes to fields.py * Update getProbLo/getProbHi * Set plasma length strength Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Fix fields method to remove CodeQL notice * Update Comments & Some Finalize * Move: set_plasma_lens_strength to MPC --------- Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: David Grote <dpgrote@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Dave Grote <grote1@llnl.gov> Co-authored-by: Roelof Groenewald <regroenewald@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-12LASY: Broadcast quantities to MPI processes (#4179)Gravatar Ilian Kara-Mostefa 1-0/+15
* Broadcast quantity & update tests * Make only one rank create the lasy file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-11In picmi.py, add G to fields to plot check (#4180)Gravatar David Grote 1-1/+1
2023-08-11Update PICMI interface for Gaussian flux (#4084)Gravatar Remi Lehe 4-4/+4
* Update PICMI interface for Gaussian flux * Update version of picmistandard
2023-08-11Enable `divE` field diagnostic with Ohm's law solver (#4178)Gravatar Roelof Groenewald 2-3/+5
* use same finite difference algo as for Yee with hybrid-PIC to calculate divE * add `divE` and `divB` to field diagnostic in picmi.py
2023-08-11Use more consistent particle type in pusher (#4175)Gravatar Remi Lehe 1-6/+6