Skip to content

Commit

Permalink
Update memaster with latest upstream/development (#144)
Browse files Browse the repository at this point in the history
* Use signed distance instead of imp. func when computing distance to EB. (ECP-WarpX#2682)

* Docs: Add Crusher-OLCF (ECP-WarpX#2741)

Document on how to compile and run on Crusher (OLCF).
This is the new Pre-Frontier MI250X machine at Oak Ridge.

Tested :)

Requires ECP-WarpX#2742

* CI: Reduce Runtime of Some PSATD Tests (ECP-WarpX#2704)

* Run Tests on 2 MPI Procs.

* Reset Benchmarks

* Make pml_psatd_dive_divb_cleaning Smaller

* Field probe line detector (ECP-WarpX#2513)

* FieldProbe using Particle

Update FieldProbe.cpp

Update FieldProbeParticleContainer.H

Updates FieldProbe and FieldProbeParticleContainer

* Make <diag>.integrate optional

The param parser query keeps te default value if no entry is found.

* Fixed number particle needed for AddNParticles

* Removing unnecessary type definition

* Added Doxygen-style comments to FieldProbe.cpp
Corrected Poynting calculation by implementing vacuum permeability

* Added Doxygen comments

* Implement virtual function ReducedDiags::AllocData() + comments

* InitData implemented

* Fixed Doxygen commenting.

* Now uses WarpX physics constant for vaccuum permeability

* forgotton comments to MultiReducedDiags

* Update Source/Diagnostics/ReducedDiags/FieldProbe.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update FieldProbe.H

* Update FieldProbe.cpp

* Update Source/Diagnostics/ReducedDiags/ReducedDiags.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/MultiReducedDiags.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/MultiReducedDiags.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update FieldProbeParticleContainer.H

* Update Source/Diagnostics/ReducedDiags/FieldProbeParticleContainer.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update FieldProbeParticleContainer.cpp

* Update FieldProbe.cpp

* Update FieldProbe.H

* Update Source/Diagnostics/ReducedDiags/FieldProbeParticleContainer.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbeParticleContainer.H

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update FieldProbeParticleContainer.cpp

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/ReducedDiags.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Changed enumerated class to struct w/ enumeration. Can remove "static_cast<int>"

* FieldProbeParticleContainer::iterator implemented

* Cleaned up output += operator, fixed output comments

* style fix

* Replaces Tabs with 4 spaces

* Defined modes and interp order to avoid GPU compilation errors

* 1 more tab fix

* EoL white spaces

* fixed a typoX

* Explicitly capturing "this" in parallel for to combat error saying "error ECP-WarpX#3223-D: Implicit capture of 'this' in extended lambda expression"

* removed unncessacesy double define

* moved output out of ParallelFor. temp variable for integrate

* Parse integrate, integrate all time steps, output setup for integrate and regular

* Fixed integrate bug.

* ammend header. integreate variable name change.

* Integrate values in input file

* updates to timing for integrate

* Update Source/Diagnostics/ReducedDiags/FieldProbeParticleContainer.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* whitespace

* Update Source/Diagnostics/ReducedDiags/FieldProbeParticleContainer.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update Source/Diagnostics/ReducedDiags/FieldProbeParticleContainer.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Functionality to create 2D line of particles. Input included. No output yet

* ammend compiler errors

* Apply suggestions from code review - Style

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update reduce_diag_names

* 2D array setup- not complete

* field_probe_integrate change

* review amends

* Apply suggestions from code review - Style

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Vectors + AddNParticles

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update FieldProbe.cpp

* Update FieldProbe.H

* bug fix and inputs

* reintroduce raw_fields functionality

* docs update and correction

* whitespaces

* Fix GPU Compile (raw_fields)

* changed f_probe to m_probe apropriately

* Typos

Co-authored-by: David Grote <dpgrote@lbl.gov>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Better name for ParticleVal

* used map for observables and units

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Simplified output. Fixed double integration error

* Update FieldProbe.H

Removed unneeded variable

* comments and fixed rawFields

* white spaces

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Update FieldProbe.H

* Guard on write

* Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Fix Syntax Error in Write

* Fix Init: Only 1 Particle (MPI)

Only one MPI rank adds a particle, which we done distribute
into the right rank.

* Fix MPI Deadlock: No Early Return

We just want to skip the write to `m_data`, not the rest
of the logic.

* Vector storage, Add N particle, debugging

* Fix Probe in Domain Logic

General global check, not only on a single rank.

* comments

* Container: Add `const_iterator`

* Fix MPI Comms

* Cleaning

* Remove PrintAll Leftover

* 1-D Output vector

* Reduced Diags: Support LoadBalance

* Cleaning of "Definitions ()"

* Updating inputs for testing Line

* data type specification

* IO

* Update inputs

* Update inputs

* error in header. Send to IO CPU

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* moved rank communication out of tile loop

* change m_data_vector. IO particle count

* Fixed input for rename. Gather particle number

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Gather

* Changed data output method to pushing values on vector
MPI Gather and Gatherv for data
Tell Evolve to run Load Balance
Tell InitData to run Load Balance
Define output method by printing valid particles

NOTE! Needs cleaning, commenting, removing some debugging tools

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Suggestions from review

* defensive programming on if / if else
added comments throughout
removed temporary debugging lines

* Documentation for line detector option

* Whitespaces

* MPI_Gather -> amrex::ParallelDescriptor::Gather

* ParallelDiscriptor, vectors at the end, no more 1990's malloc for capacity allocation

* whitespaces

* output optimized for CSV

* Python notebook for reference

* Input file for current test on CORI

* 2D plane functionality

* Regression test

* Delete DoubleSlit_2021_11_17.ipynb

* Whitespace fix

* pandas

* Error set to 2.5%, fixed source

* style

* zenodo orcid

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* Review changes and swapped MPI direct call for Amrex::ParallelDescriptor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update WarpX-tests.ini

Fix Regression Test

* Update WarpX-tests.ini

Open PMD in cmakeSetupOpts

* Update dependencies.rst

* Update analysis_field_probe.py

* Update WarpX-tests.ini

* Analysis Script: Executable

```
chmod a+x scriptname.py
```

and use explicitly `python3`

* openPMD: optional for this test

* Inputs: add `geometry.dims = 2`

* Remove: diag1.write_species = 0

- segfaults for plotfiles (bug?)
- not needed, since we have no particles anyway

* Fix: typo in analysis

* test requirements: pandas

* Fix: Types

* as string: `<red_diag>.probe_geometry`

change this to a string, which is more user-friendly

* Python Script: Simplify + Style

* C++: Clean Up

* Azure: Run `apt update`

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: David Grote <dpgrote@lbl.gov>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Fix ASSERT for Hybrid Scheme & MR (ECP-WarpX#2744)

* CI: Use New "verbose" mode (ECP-WarpX#2747)

repeat captured errors to stderr, e.g., for CI runs

* Set geometry earlier in picmi (ECP-WarpX#2745)

* Set geometry earlier in Python

* Fix comment typos

* CI: Use new "archive_output = 0" mode (ECP-WarpX#2749)

Avoid `.tgz`-ing the output files, so we can interact directly
with plotfiles with our benchmark scripts.

Implementation proposed in:
AMReX-Codes/regression_testing#117

* .editorconfig: add missing newline

pretty sections

* Python: Fix UB in Inputs Passing (ECP-WarpX#2726)

Trying to fix the macOS PyPy 3.7 error seen in conda-forge/warpx-feedstock#37
Testing in conda-forge/warpx-feedstock#38

After googling for a while, the original implementation was likely based on https://code.activestate.com/lists/python-list/704158, which contains bugs.

1) Bug: `create_string_buffer`

Allocating new, null-terminated char arrays with `ctypes.create_string_buffer` does lead to scrambled arrays in pypy3.7.
As far as I can see, this [should have also worked](https://docs.python.org/3/library/ctypes.html), but maybe there is a bug in the upstream implementation or the original code created some kind of use-after-free on a temporary while the new implementation just shares the existing byte address.

This leads to errors such as the ones here:
conda-forge/warpx-feedstock#38 (comment)

The call `argvC[i] = ctypes.c_char_p(enc_arg)` is equivalent in creating a `NULL`-terminated char array.

2) Bug: Last Argv Argument

The last argument in the array of char arrays `argv` in ANSII C needs to be a plain `NULL` ptr.
Before this PR, this has been allocated but never initialized, leading to undefined behavior (read as: crashes).

Reference: https://stackoverflow.com/a/39096006/2719194

3) Cleanup: there is a pre-defined `ctypes.c_char_p` we can use for pointer of char.

* Do Not Read/Use Centering Info if do_nodal=1 (ECP-WarpX#2754)

* Docs: Python Dev Install `--no-deps` (ECP-WarpX#2750)

`--force-reinstall` will also re-install all dependencies, unless
`--no-deps` is also passed. In the case of re-installing developer
builds, this is what we want with pre-configured environments.

Using `--no-build-isolation` with the same flag does not achieve the
same effect.

* Refactor python callback handling (ECP-WarpX#2703)

* added support to uninstall an external Poisson solver and return to using the default MLMG solver; also updated some callbacks.py calls to Python3

* refactor callback handling - use a map to handle all the different callbacks

* warpx_callback_py_map does not need to link to C

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* further suggested changes from code review

* added function ExecutePythonCallback to reduce code duplication

* moved ExecutePythonCallback to WarpX_py

* added function IsPythonCallbackInstalled

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* RZ: Do Not Add geometry.coord_sys (ECP-WarpX#2759)

* CI: Run `initial_distribution` on 1 MPI Process (ECP-WarpX#2760)

* Fix override default particle tiling (ECP-WarpX#2762)

* Override the default tiling option for particles *before* WarpX is initialized.

* bump AMReX version to see if tests pass.

* fix typo

* style

* use queryAdd

* namespace

* RigidInjection_BTD: Specify H5 Backend (ECP-WarpX#2761)

We default to `.bp` files when available.
This results for this test in:
```
amrex::Abort::0:: Currently BackTransformed diagnostics type does not support species output for ADIOS backend. Please select h5 as openpmd backend !!!
```

* Docs: Reorder HPC Profiles + Batch Scripts (ECP-WarpX#2757)

* Docs: Reorder Summit Files

* Docs: Reorder Spock Files

* Docs: Reorder Cori Files

* Docs: Reorder Perlmutter Files

* Docs: Reorder Juwels Files

* Docs: Reorder Lassen Files

* Docs: Reorder Quartz Files

* Docs: Reorder Ookami Files

* Docs: Also Move Summit Profile Script

* Listing Captions: Location in Source

* Sphinx: Clean Warnings/Formatting (ECP-WarpX#2758)

* Sphinx: Clean Warnings/Formatting

Remove formatting errors in Sphinx that caused warnings/ill-formed
formatting.

* Move `boundary.reflect_all_velocities`

Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>

* Fix: character after verbatim

Not allowed and does render broken.

* Fix broken `.. directive::`

Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>

* Fix unstable Python_particle_attr_access CI tests (ECP-WarpX#2766)

* explicitly set the numpy random seed in Python_particle_attr_access tests

* also shrink boundaries in which particles are injected for good measure

* also explicitly set the numpy random seed in Python_restart_runtime_components CI test

* Docs: Clang 7+ (ECP-WarpX#2763)

Seen in openPMD/openPMD-api#1164 for
`<variant>`, clang 6 is not to be recommended for C++17 compilation
unless by expert users that know how to change the stdlib.

Thus, let's only recommend Clang 7+.

Ubuntu 18.04 (bionic/oldstable) ships clang 6 by default, but
Ubuntu 20.04 (focal/stable) is already at clang 10.

* Doc: Perlmutter Note `_g` Batch Script (ECP-WarpX#2767)

Add one more note.

* Implement PML for the outer RZ boundary with PSATD (ECP-WarpX#2211)

* Initial version of RZ PSATD PML BCs

* Cleaned up some bugs

* Add support of do_pml_in_domain option

* Cleaned up stuff for building

* Fix PMLPsatdAlgorithm macro

* Removed unneeded variable from SpectralSolverRZ

* Change length 3 arrays to length 2 (for 2D)

* Cleanup around DampPML

* Added more checks of pml[lev]

* Added CI test for RZ PML

* Added code to update the corner guard cells

* Further updates

* Added CI test

* Fixed EOL space

* Updated CI benchmarks, removing round off fields

* Changes to CI missed on previous commit

* Various fixes for clean up

* More fixes for clean up

* Further cleanup

* Updated benchmark

* Fixed benchmarks file

* Minor cleanup

* Added round off benchmark values

* Fixed testname in analysis_pml_psatd_rz.py

* Update comment in analysis file

* Put pml_rz code in RZ and PSATD macro blocks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add geometry.dims input to CI test input file, inputs_rz

* Cleanup to match recent changes

Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* AMReX: Update latest (ECP-WarpX#2752)

* Access species specific charge density from python (ECP-WarpX#2710)

* added python wrapper function to deposit a specific species density in rho_fp

* added 1D ES input file with MCC that uses the charge deposition functionality

* reset rho_fp[lev] before depositing

* updated documentation

* switch to using simulation.extension in Poisson solver

* Apply suggestion from code review

Co-authored-by: Phil Miller <phil.miller@intensecomputing.com>

* suggested changes from code review

* add comment explaining why a direct Poisson solver is used

* removed direct solver in 1D example since it is actually slower than the MLMG solver

* Apply suggestions from code review

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* added docstring for warpx_depositChargeDensity

* fixed order of imports in new PICMI input file

Co-authored-by: Phil Miller <phil.miller@intensecomputing.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>

* update reference values for CI test; add SyncRho call to deposit rho

Co-authored-by: Andrew Myers <atmyers@lbl.gov>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Co-authored-by: Tiberius Rheaume <35204125+TiberiusRheaume@users.noreply.github.com>
Co-authored-by: David Grote <dpgrote@lbl.gov>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: David Grote <grote1@llnl.gov>
Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Co-authored-by: Phil Miller <phil.miller@intensecomputing.com>
  • Loading branch information
11 people authored Jan 24, 2022
2 parents e0e3dc4 + 9b7dca5 commit 27206c4
Show file tree
Hide file tree
Showing 117 changed files with 2,812 additions and 1,010 deletions.
3 changes: 2 additions & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ jobs:
set -eu -o pipefail
cat /proc/cpuinfo | grep "model name" | sort -u
df -h
sudo apt update
sudo apt install -y ccache curl gcc gfortran git g++ ninja-build \
openmpi-bin libopenmpi-dev \
libfftw3-dev libfftw3-mpi-dev libhdf5-openmpi-dev pkg-config make \
python3 python3-pip python3-venv python3-setuptools libblas-dev liblapack-dev
python3 python3-pandas python3-pip python3-venv python3-setuptools libblas-dev liblapack-dev
ccache --set-config=max_size=10.0G
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ trim_trailing_whitespace = false
indent_style = tab
indent_size = unset


[*.py]
# isort config
force_sort_within_sections = true
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ repos:
# - id: fix-encoding-pragma
# exclude: ^noxfile.py$

# documentation files: .rst
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
# - id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

#- repo: https://github.com/asottile/pyupgrade
# rev: v2.29.0
# hooks:
Expand Down
5 changes: 5 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@
"name": "Myers, Andrew",
"orcid": "0000-0001-8427-8330"
},
{
"affiliation": "Lawrence Berkeley National Laboratory",
"name": "Rheaume, Tiberius",
"orcid": "0000-0002-6710-0650"
},
{
"affiliation": "Lawrence Berkeley National Laboratory",
"name": "Rowan, Michael E.",
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ set(PYINSTALLOPTIONS "" CACHE STRING "Additional parameters to pass to `pip inst
add_custom_target(install_pip
${CMAKE_COMMAND} -E env PYWARPX_LIB_DIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} python3 -m pip wheel -v --use-feature=in-tree-build ${WarpX_SOURCE_DIR}
COMMAND
python3 -m pip install --force-reinstall -v ${PYINSTALLOPTIONS} ${CMAKE_BINARY_DIR}/*whl
python3 -m pip install --force-reinstall --no-deps -v ${PYINSTALLOPTIONS} ${CMAKE_BINARY_DIR}/*whl
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Periodically commit your changes with
The commit message (between quotation marks) is super important in order to follow the developments during code-review and identify bugs.
A typical format is:

.. code-block::
.. code-block:: text
This is a short, 40-character title
Expand Down
8 changes: 1 addition & 7 deletions Docs/source/developers/fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ This is mostly implemented in ``Source/Parallelization``, see the following func

.. doxygenfunction:: WarpX::SyncCurrent

.. doxygenfunction:: interpolateCurrentFineToCoarse

.. doxygenfunction:: WarpX::RestrictCurrentFromFineToCoarsePatch

.. doxygenfunction:: WarpX::AddCurrentFromFineLevelandSumBoundary
Expand All @@ -112,11 +110,7 @@ General functions for filtering can be found in ``Source/Filter/``, where the ma
Bilinear filter
~~~~~~~~~~~~~~~

The multi-pass bilinear filter (applied on the current density) is implemented in ``Source/Filter/``, and class ``WarpX`` holds an instance of this class in member variable ``WarpX::bilinear_filter``. For performance reasons (to avoid creating too many guard cells), this filter is directly applied in communication routines, see

.. doxygenfunction:: WarpX::AddCurrentFromFineLevelandSumBoundary

and
The multi-pass bilinear filter (applied on the current density) is implemented in ``Source/Filter/``, and class ``WarpX`` holds an instance of this class in member variable ``WarpX::bilinear_filter``. For performance reasons (to avoid creating too many guard cells), this filter is directly applied in communication routines, see ``WarpX::AddCurrentFromFineLevelandSumBoundary`` above and

.. doxygenfunction:: WarpX::ApplyFilterandSumBoundaryJ

Expand Down
6 changes: 3 additions & 3 deletions Docs/source/install/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,20 @@ Python Bindings (Developers)

.. code-block:: bash
python3 -m pip install --force-reinstall -v .
python3 -m pip install --force-reinstall --no-deps -v .
Some Developers like to code directly against a local copy of AMReX, changing both code-bases at a time:

.. code-block:: bash
WARPX_AMREX_SRC=$PWD/../amrex python3 -m pip install --force-reinstall -v .
WARPX_AMREX_SRC=$PWD/../amrex python3 -m pip install --force-reinstall --no-deps -v .
Additional environment control as common for CMake (:ref:`see above <building-cmake-intro>`) can be set as well, e.g. ``CC``, `CXX``, and ``CMAKE_PREFIX_PATH`` hints.
So another sophisticated example might be: use Clang as the compiler, build with local source copies of PICSAR and AMReX, support the PSATD solver, MPI and openPMD, hint a parallel HDF5 installation in ``$HOME/sw/hdf5-parallel-1.10.4``, and only build 3D geometry:

.. code-block:: bash
CC=$(which clang) CXX=$(which clang++) WARPX_AMREX_SRC=$PWD/../amrex WARPX_PICSAR_SRC=$PWD/../picsar WARPX_PSATD=ON WARPX_MPI=ON WARPX_DIMS=3 CMAKE_PREFIX_PATH=$HOME/sw/hdf5-parallel-1.10.4:$CMAKE_PREFIX_PATH python3 -m pip install --force-reinstall -v .
CC=$(which clang) CXX=$(which clang++) WARPX_AMREX_SRC=$PWD/../amrex WARPX_PICSAR_SRC=$PWD/../picsar WARPX_PSATD=ON WARPX_MPI=ON WARPX_DIMS=3 CMAKE_PREFIX_PATH=$HOME/sw/hdf5-parallel-1.10.4:$CMAKE_PREFIX_PATH python3 -m pip install --force-reinstall --no-deps -v .
Here we wrote this all in one line, but one can also set all environment variables in a development environment and keep the pip call nice and short as in the beginning.
Note that you need to use absolute paths for external source trees, because pip builds in a temporary directory, e.g. ``export WARPX_AMREX_SRC=$HOME/src/amrex``.
Expand Down
10 changes: 5 additions & 5 deletions Docs/source/install/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Dependencies
WarpX depends on the following popular third party software.
Please see installation instructions below.

- a mature `C++17 <https://en.wikipedia.org/wiki/C%2B%2B17>`__ compiler, e.g., GCC 7, Clang 6, NVCC 11.0, MSVC 19.15 or newer
- a mature `C++17 <https://en.wikipedia.org/wiki/C%2B%2B17>`__ compiler, e.g., GCC 7, Clang 7, NVCC 11.0, MSVC 19.15 or newer
- `CMake 3.18.0+ <https://cmake.org>`__
- `Git 2.18+ <https://git-scm.com>`__
- `AMReX <https://amrex-codes.github.io>`__: we automatically download and compile a copy of AMReX
Expand Down Expand Up @@ -74,7 +74,7 @@ If you also want to run runtime tests and added Python (``spack add python`` and

.. code-block:: bash
python3 -m pip install matplotlib yt scipy numpy openpmd-api virtualenv
python3 -m pip install matplotlib yt scipy pandas numpy openpmd-api virtualenv
If you want to run the ``./run_test.sh`` :ref:`test script <developers-testing>`, which uses our legacy GNUmake build system, you need to set the following environment hints after ``spack env activate warpx-dev`` for dependent software:

Expand Down Expand Up @@ -125,7 +125,7 @@ Without MPI:

.. code-block:: bash
conda create -n warpx-dev -c conda-forge blaspp ccache cmake compilers git lapackpp openpmd-api python numpy scipy yt fftw matplotlib mamba ninja pip virtualenv
conda create -n warpx-dev -c conda-forge blaspp ccache cmake compilers git lapackpp openpmd-api python numpy pandas scipy yt fftw matplotlib mamba ninja pip virtualenv
source activate warpx-dev
# compile WarpX with -DWarpX_MPI=OFF
Expand All @@ -134,7 +134,7 @@ With MPI (only Linux/macOS):

.. code-block:: bash
conda create -n warpx-dev -c conda-forge blaspp ccache cmake compilers git lapackpp "openpmd-api=*=mpi_openmpi*" python numpy scipy yt "fftw=*=mpi_openmpi*" matplotlib mamba ninja openmpi pip virtualenv
conda create -n warpx-dev -c conda-forge blaspp ccache cmake compilers git lapackpp "openpmd-api=*=mpi_openmpi*" python numpy pandas scipy yt "fftw=*=mpi_openmpi*" matplotlib mamba ninja openmpi pip virtualenv
source activate warpx-dev
For legacy ``GNUmake`` builds, after each ``source activate warpx-dev``, you also need to set:
Expand All @@ -152,7 +152,7 @@ Apt (Debian/Ubuntu)
.. code-block:: bash
sudo apt update
sudo apt install build-essential ccache cmake g++ git libfftw3-mpi-dev libfftw3-dev libhdf5-openmpi-dev libopenmpi-dev pkg-config python3 python3-matplotlib python3-numpy python3-pip python3-scipy python3-venv
sudo apt install build-essential ccache cmake g++ git libfftw3-mpi-dev libfftw3-dev libhdf5-openmpi-dev libopenmpi-dev pkg-config python3 python3-matplotlib python3-numpy python3-pandas python3-pip python3-scipy python3-venv
# optional:
# for CUDA, either install
Expand Down
1 change: 1 addition & 0 deletions Docs/source/install/hpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ HPC Systems
hpc/perlmutter
hpc/summit
hpc/spock
hpc/crusher
hpc/juwels
hpc/lassen
hpc/quartz
Expand Down
103 changes: 20 additions & 83 deletions Docs/source/install/hpc/cori.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,9 @@ KNL

We use the following modules and environments on the system (``$HOME/knl_warpx.profile``).

.. code-block:: bash
module swap craype-haswell craype-mic-knl
module swap PrgEnv-intel PrgEnv-gnu
module load cmake/3.21.3
module switch cray-libsci cray-libsci/20.09.1
module load cray-hdf5-parallel/1.10.5.2
module load cray-fftw/3.3.8.4
module load cray-python/3.7.3.2
export PKG_CONFIG_PATH=$FFTW_DIR/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/c-blosc-1.12.1-knl-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/adios2-2.7.1-knl-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/blaspp-master-knl-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/lapackpp-master-knl-install:$CMAKE_PREFIX_PATH
if [ -d "$HOME/sw/venvs/knl_warpx" ]
then
source $HOME/sw/venvs/knl_warpx/bin/activate
fi
export CXXFLAGS="-march=knl"
export CFLAGS="-march=knl"
.. literalinclude:: ../../../../Tools/machines/cori-nersc/knl_warpx.profile.example
:language: bash
:caption: You can copy this file from ``Tools/machines/cori-nersc/knl_warpx.profile.example``.

And install ADIOS2, BLAS++ and LAPACK++:

Expand Down Expand Up @@ -105,25 +85,9 @@ Haswell

We use the following modules and environments on the system (``$HOME/haswell_warpx.profile``).

.. code-block:: bash
module swap PrgEnv-intel PrgEnv-gnu
module load cmake/3.21.3
module switch cray-libsci cray-libsci/20.09.1
module load cray-hdf5-parallel/1.10.5.2
module load cray-fftw/3.3.8.4
module load cray-python/3.7.3.2
export PKG_CONFIG_PATH=$FFTW_DIR/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/c-blosc-1.12.1-haswell-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/adios2-2.7.1-haswell-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/blaspp-master-haswell-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/lapackpp-master-haswell-install:$CMAKE_PREFIX_PATH
if [ -d "$HOME/sw/venvs/haswell_warpx" ]
then
source $HOME/sw/venvs/haswell_warpx/bin/activate
fi
.. literalinclude:: ../../../../Tools/machines/cori-nersc/haswell_warpx.profile.example
:language: bash
:caption: You can copy this file from ``Tools/machines/cori-nersc/haswell_warpx.profile.example``.

And install ADIOS2, BLAS++ and LAPACK++:

Expand Down Expand Up @@ -174,41 +138,11 @@ GPU (V100)

Cori provides a partition with `18 nodes that include V100 (16 GB) GPUs <https://docs-dev.nersc.gov/cgpu/>`__.
We use the following modules and environments on the system (``$HOME/gpu_warpx.profile``).
You can copy this file from ``Tools/machines/cori-nersc/gpu_warpx.profile.example``:

.. code-block:: bash
export proj="m1759"
module purge
module load modules
module load cgpu
module load esslurm
module load gcc/8.3.0 cuda/11.4.0 cmake/3.21.3
module load openmpi
export CMAKE_PREFIX_PATH=$HOME/sw/c-blosc-1.12.1-gpu-install:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$HOME/sw/adios2-2.7.1-gpu-install:$CMAKE_PREFIX_PATH
if [ -d "$HOME/sw/venvs/gpu_warpx" ]
then
source $HOME/sw/venvs/gpu_warpx/bin/activate
fi
# compiler environment hints
export CC=$(which gcc)
export CXX=$(which g++)
export FC=$(which gfortran)
export CUDACXX=$(which nvcc)
export CUDAHOSTCXX=$(which g++)
# optimize CUDA compilation for V100
export AMREX_CUDA_ARCH=7.0
# allocate a GPU, e.g. to compile on
# 10 logical cores (5 physical), 1 GPU
function getNode() {
salloc -C gpu -N 1 -t 30 -c 10 --gres=gpu:1 -A $proj
}
.. literalinclude:: ../../../../Tools/machines/cori-nersc/gpu_warpx.profile.example
:language: bash
:caption: You can copy this file from ``Tools/machines/cori-nersc/gpu_warpx.profile.example``.

And install ADIOS2:

Expand Down Expand Up @@ -306,14 +240,15 @@ Do not forget to first ``source $HOME/knl_warpx.profile`` if you have not done s

For PICMI Python runs, the ``<path/to/executable>`` has to read ``python3`` and the ``<input file>`` is the path to your PICMI input script.

.. literalinclude:: ../../../../Tools/BatchScripts/batch_cori.sh
.. literalinclude:: ../../../../Tools/machines/cori-nersc/cori_knl.sbatch
:language: bash
:caption: You can copy this file from ``Tools/machines/cori-nersc/cori_knl.sbatch``.

To run a simulation, copy the lines above to a file ``batch_cori.sh`` and run
To run a simulation, copy the lines above to a file ``cori_knl.sbatch`` and run

.. code-block:: bash
sbatch batch_cori.sh
sbatch cori_knl.sbatch
to submit the job.

Expand All @@ -338,15 +273,16 @@ The batch script below can be used to run a WarpX simulation on 1 `Haswell node

Do not forget to first ``source $HOME/haswell_warpx.profile`` if you have not done so already for this terminal session.

.. literalinclude:: ../../../../Tools/BatchScripts/batch_cori_haswell.sh
.. literalinclude:: ../../../../Tools/machines/cori-nersc/cori_haswell.sbatch
:language: bash
:caption: You can copy this file from ``Tools/machines/cori-nersc/cori_haswell.sbatch``.

To run a simulation, copy the lines above to a file ``batch_cori_haswell.sh`` and
To run a simulation, copy the lines above to a file ``cori_haswell.sbatch`` and
run

.. code-block:: bash
sbatch batch_cori_haswell.sh
sbatch cori_haswell.sbatch
to submit the job.

Expand All @@ -367,8 +303,9 @@ For single-node runs, try to run one grid per GPU.

A multi-node batch script template can be found below:

.. literalinclude:: ../../../../Tools/BatchScripts/batch_cori_gpu.sh
.. literalinclude:: ../../../../Tools/machines/cori-nersc/cori_gpu.sbatch
:language: bash
:caption: You can copy this file from ``Tools/machines/cori-nersc/cori_gpu.sbatch``.


.. _post-processing-cori:
Expand Down
Loading

0 comments on commit 27206c4

Please sign in to comment.