Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lucafedeli88 committed Jan 27, 2025
2 parents 3f011b1 + 4eccf4d commit 37a294a
Show file tree
Hide file tree
Showing 91 changed files with 1,652 additions and 970 deletions.
12 changes: 10 additions & 2 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,16 @@ jobs:
- bash: |
# set options
set -o nounset errexit pipefail
# run tests (exclude pytest.AMReX when running Python tests)
ctest --test-dir build --output-on-failure -E AMReX
# determine if the build was triggered by a push to the development branch
if [[ "$(Build.SourceBranch)" == "refs/heads/development" ]]; then
# run tests (exclude pytest.AMReX when running Python tests)
# and submit results to CDash as Experimental
ctest --test-dir build --output-on-failure -E AMReX \
-D ExperimentalTest -D ExperimentalSubmit
else
# run tests (exclude pytest.AMReX when running Python tests)
ctest --test-dir build --output-on-failure -E AMReX
fi
displayName: 'Test'
- bash: |
Expand Down
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/blank_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Blank issue
about: Ask us a question
labels: [question]
---

Are you here because you have something to report that is neither a bug, a new feature, nor an installation problem?

Before opening this issue, consider opening a [discussion](https://github.com/ECP-WarpX/WarpX/discussions) instead!

Issues are used to report bugs, installation problems or to request new features.
Discussions are used to ask more open-ended questions, brainstorm, ask our feedback, etc.

You can find more details on how to use issues and discussions [here](https://github.com/ECP-WarpX/WarpX/blob/development/CONTRIBUTING.rst).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blank_issues_enabled: true
blank_issues_enabled: false
2 changes: 1 addition & 1 deletion .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
dim: [1, 2, RZ, 3]
name: clang-tidy-${{ matrix.dim }}D
runs-on: ubuntu-22.04
timeout-minutes: 180
timeout-minutes: 220
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/openPMD/openPMD-api.git@0.15.1 \
git+https://github.com/openPMD/openPMD-api.git@0.16.1 \
-DopenPMD_USE_PYTHON=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach e761abff95afbfa442cbe108027094bbddef5b11 && cd -
cd ../amrex && git checkout --detach 0f46a1615c17f0bbeaedb20c27a97c9f6e439781 && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_FFT=TRUE USE_CCACHE=TRUE -j 4
ccache -s
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies/icc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export CEI_TMP="/tmp/cei"
CXX=$(which icpc) CC=$(which icc) \
cmake-easyinstall \
--prefix=/usr/local \
git+https://github.com/openPMD/openPMD-api.git@0.15.2 \
git+https://github.com/openPMD/openPMD-api.git@0.16.1 \
-DopenPMD_USE_PYTHON=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ repos:
# Python: Ruff linter & formatter
# https://docs.astral.sh/ruff/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.2
hooks:
# Run the linter
- id: ruff
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ if(WarpX_FFT)
set(ABLASTR_FFT ON CACHE STRING "FFT-based solvers" FORCE)
endif()

# this defined the variable BUILD_TESTING which is ON by default
# Define the variable BUILD_TESTING (ON by default),
# include CDash dashboard testing module
include(CTest)


Expand Down
30 changes: 30 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,36 @@ Git workflow
The WarpX project uses `git <https://git-scm.com>`_ for version control.
If you are new to git, you can follow `this tutorial <https://swcarpentry.github.io/git-novice/>`__.


What to do when
^^^^^^^^^^^^^^^

Issues
""""""

`Issues <https://github.com/ECP-WarpX/WarpX/issues>`__ are used to track tasks that the contributors and/or maintainers can work on.
Use issues for reporting bugs or installation problems and for requesting new features.

If you've found a bug and wish to report it, first search the open issues and `pull requests <https://github.com/ECP-WarpX/WarpX/pulls>`__ to see if someone else has already reported the same thing.
If it's something new, open an issue using a template.
We'll use the issue to address the problem you've encountered.

Discussions
"""""""""""

`Discussions <https://github.com/ECP-WarpX/WarpX/discussions>`__ are for open-ended conversations, general questions, brainstorming ideas.
Please, use discussions if you want to ask us something that is not technically a bug or a feature.
Feel free to ping us there!

Pull Requests (PRs)
"""""""""""""""""""

Open a `pull request <https://github.com/ECP-WarpX/WarpX/pulls>`__ if you want to add a new feature yourself.
Follow the guide below for more details.


Thank you for contributing! 🥰

Configure your GitHub Account & Development Machine
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
18 changes: 18 additions & 0 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
## ENABLE_TESTING()
## INCLUDE(CTest)

set(CTEST_PROJECT_NAME WarpX)
set(CTEST_NIGHTLY_START_TIME 08:00:00 UTC)

set(CTEST_SUBMIT_URL https://my.cdash.org/submit.php?project=WarpX)

set(CTEST_DROP_SITE_CDASH TRUE)

# Additional settings
set(CTEST_SITE "Azure-Pipelines")
set(CTEST_BUILD_NAME "CI-Development")
5 changes: 3 additions & 2 deletions Docs/source/dataanalysis/workflows.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.. _dataanalysis-how-to:
.. _dataanalysis-workflows:

Workflows
=========
How-To Guides
=============

This section collects typical user workflows and best practices for data analysis with WarpX.

Expand Down
2 changes: 1 addition & 1 deletion Docs/source/developers/gnumake/openpmd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ therefore we recommend to use `spack <https://
spack.io>`__ in order to facilitate the installation.

More specifically, we recommend that you try installing the
`openPMD-api library 0.15.1 or newer <https://openpmd-api.readthedocs.io/en/0.15.1/>`__
`openPMD-api library 0.16.1 or newer <https://openpmd-api.readthedocs.io/en/0.16.1/>`__
using spack (first section below). If this fails, a back-up solution
is to install parallel HDF5 with spack, and then install the openPMD-api
library from source.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _developers-local-compile:

Fast, Local Compilation
=======================
How to compile locally and fast
===============================

For simplicity, WarpX :ref:`compilation with CMake <building-cmake>` by default downloads, configures and compiles compatible versions of :ref:`central dependencies <install-dependencies>` such as:

Expand Down
13 changes: 13 additions & 0 deletions Docs/source/developers/how_to_guides.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _development-howtoguides:

How-To Guides
=============

.. toctree::
:maxdepth: 1

how_to_profile
how_to_test
how_to_run_clang_tidy
how_to_compile_locally
how_to_write_the_docs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _developers-profiling:

Profiling the Code
==================
How to profile the code
=======================

Profiling allows us to find the bottle-necks of the code as it is currently implemented.
Bottle-necks are the parts of the code that may delay the simulation, making it more computationally expensive.
Expand Down
51 changes: 51 additions & 0 deletions Docs/source/developers/how_to_run_clang_tidy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. _developers-run_clang_tidy_locally:

How to run the clang-tidy linter
================================

WarpX's CI tests include several checks performed with the `clang-tidy <https://clang.llvm.org/extra/clang-tidy/>`__ linter.
The complete list of checks performed is defined in the ``.clang-tidy`` configuration file.

.. dropdown:: clang-tidy configuration file
:color: light
:icon: info
:animate: fade-in-slide-down

.. literalinclude:: ../../../.clang-tidy
:language: yaml

Under `Tools/Linter <https://github.com/ECP-WarpX/WarpX/blob/development/Tools/Linter>`__, the script ``runClangTidy.sh`` can be used to run the clang-tidy linter locally.

.. dropdown:: clang-tidy local run script
:color: light
:icon: info
:animate: fade-in-slide-down

.. literalinclude:: ../../../Tools/Linter/runClangTidy.sh
:language: bash

It is a prerequisite that WarpX is compiled following the instructions that you find in our :ref:`Users <install-cmake>` or :ref:`Developers <building-cmake>` sections.

The script generates a wrapper to ensure that clang-tidy is only applied to WarpX source files and compiles WarpX in 1D, 2D, 3D, and RZ geometry, using such wrapper.

By default WarpX is compiled in single precision with PSATD solver, QED module, QED table generator and embedded boundary in order to ensure broader coverage with the clang-tidy tool.

Few optional environment variables can be set to tune the behavior of the script:

* ``WARPX_TOOLS_LINTER_PARALLEL``: set the number of cores used for compilation;

* ``CLANG``, ``CLANGXX``, and ``CLANGTIDY``: set the version of the compiler and the linter.

For continuous integration we currently use clang version 15.0.0 and it is recommended to use this version locally as well.
A newer version may find issues not currently covered by CI tests (checks are opt-in), while older versions may not find all the issues.

Here's an example of how to run the script after setting the appropriate environment variables:

.. code-block:: bash
export WARPX_TOOLS_LINTER_PARALLEL=12
export CLANG=clang-15
export CLANGXX=clang++-15
export CLANGTIDY=clang-tidy-15
./Tools/Linter/runClangTidy.sh
Loading

0 comments on commit 37a294a

Please sign in to comment.