From f85a4a12e3d432c094d951608137957f2944dbf5 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 11 Dec 2023 17:18:48 -0800 Subject: [PATCH 1/5] Add Wake-T Wake-T (Wakefield particle Tracker) is a tracking code for laser- and beam-driven plasma wakefield accelerators which aims at providing a fast alternative to Particle-in-Cell (PIC) simulations. --- recipes/wake-t/meta.yaml | 62 +++++++++++++++++++++++++++++++++++++ recipes/wake-t/run_test.bat | 9 ++++++ recipes/wake-t/run_test.sh | 9 ++++++ 3 files changed, 80 insertions(+) create mode 100644 recipes/wake-t/meta.yaml create mode 100644 recipes/wake-t/run_test.bat create mode 100755 recipes/wake-t/run_test.sh diff --git a/recipes/wake-t/meta.yaml b/recipes/wake-t/meta.yaml new file mode 100644 index 0000000000000..42e62e04bd0c0 --- /dev/null +++ b/recipes/wake-t/meta.yaml @@ -0,0 +1,62 @@ +{% set version = "0.7.1" %} + +package: + name: wake-t + version: {{ version }} + +source: + url: https://github.com/AngelFP/Wake-T/archive/refs/tags/v{{ version }}.tar.gz + sha256: 9386cc52ca98e272518686da3e02a690363ecde689f7b03b07aeb2ecece2ee05 + +build: + number: 0 + noarch: python + script: {{ PYTHON }} -m pip install . -vv + +requirements: + host: + - pip + - python >=3.6 + - setuptools + run: + - aptools + - numba + - numpy + - openpmd-api + - python >=3.6 + - scipy + - tqdm + +test: + requires: + - matplotlib + - openpmd-viewer + - python + - pytest + source_files: + - examples/ + - tests/ + imports: + - wake_t + +about: + home: https://wake-t.readthedocs.io + license: GPL-3.0-or-later + license_family: GPL3 + license_file: LICENSE + summary: A fast tracking code for plasma accelerators + + description: | + Wake-T (Wakefield particle Tracker) is a tracking code for laser- and + beam-driven plasma wakefield accelerators which aims at providing a fast + alternative to Particle-in-Cell (PIC) simulations. Instead of relying on + the computationally-expensive PIC algorithm for simulating the plasma + wakefields and the beam evolution, Wake-T uses a Runge-Kutta solver to + track the evolution of the beam electrons in the wakefields, which, at + the same time, are computed from reduced models. + dev_url: https://github.com/AngelFP/Wake-T + +extra: + recipe-maintainers: + - AngelFP + - ax3l diff --git a/recipes/wake-t/run_test.bat b/recipes/wake-t/run_test.bat new file mode 100644 index 0000000000000..f65c3e7fd3dff --- /dev/null +++ b/recipes/wake-t/run_test.bat @@ -0,0 +1,9 @@ +@echo on + +:: Example +%PYTHON% examples\track_plasma_fluid.py +if errorlevel 1 exit 1 + +:: pytest +%PYTHON% -m pytest -s -vvvv tests\ +if errorlevel 1 exit 1 diff --git a/recipes/wake-t/run_test.sh b/recipes/wake-t/run_test.sh new file mode 100755 index 0000000000000..95670b15171c9 --- /dev/null +++ b/recipes/wake-t/run_test.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -eu -x -o pipefail + +# Example +$PYTHON examples/track_plasma_fluid.py + +# pytest +$PYTHON -m pytest -s -vvvv tests/ From 8a5a5ba1c10c117e07ca7471246befdb4df64855 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 19 Dec 2023 01:52:01 -0800 Subject: [PATCH 2/5] OMP_NUM_THREADS=2 --- recipes/wake-t/run_test.bat | 2 ++ recipes/wake-t/run_test.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/recipes/wake-t/run_test.bat b/recipes/wake-t/run_test.bat index f65c3e7fd3dff..06c2b51f21804 100644 --- a/recipes/wake-t/run_test.bat +++ b/recipes/wake-t/run_test.bat @@ -1,5 +1,7 @@ @echo on +set "OMP_NUM_THREADS=2" + :: Example %PYTHON% examples\track_plasma_fluid.py if errorlevel 1 exit 1 diff --git a/recipes/wake-t/run_test.sh b/recipes/wake-t/run_test.sh index 95670b15171c9..8e08c2fdddeff 100755 --- a/recipes/wake-t/run_test.sh +++ b/recipes/wake-t/run_test.sh @@ -2,6 +2,8 @@ set -eu -x -o pipefail +export OMP_NUM_THREADS=2 + # Example $PYTHON examples/track_plasma_fluid.py From 54d783330d8ca0a8aeee26b09e5e735631ab922f Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 19 Dec 2023 03:40:21 -0800 Subject: [PATCH 3/5] Avoid Blocking `plt.show()` in Example --- recipes/wake-t/run_test.bat | 4 ---- recipes/wake-t/run_test.sh | 3 --- 2 files changed, 7 deletions(-) diff --git a/recipes/wake-t/run_test.bat b/recipes/wake-t/run_test.bat index 06c2b51f21804..3585f52b30baf 100644 --- a/recipes/wake-t/run_test.bat +++ b/recipes/wake-t/run_test.bat @@ -2,10 +2,6 @@ set "OMP_NUM_THREADS=2" -:: Example -%PYTHON% examples\track_plasma_fluid.py -if errorlevel 1 exit 1 - :: pytest %PYTHON% -m pytest -s -vvvv tests\ if errorlevel 1 exit 1 diff --git a/recipes/wake-t/run_test.sh b/recipes/wake-t/run_test.sh index 8e08c2fdddeff..c7f760aae83bd 100755 --- a/recipes/wake-t/run_test.sh +++ b/recipes/wake-t/run_test.sh @@ -4,8 +4,5 @@ set -eu -x -o pipefail export OMP_NUM_THREADS=2 -# Example -$PYTHON examples/track_plasma_fluid.py - # pytest $PYTHON -m pytest -s -vvvv tests/ From 7d3c57a696312a71081fa6d66ac5281a6112d1f7 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 19 Dec 2023 10:56:25 -0800 Subject: [PATCH 4/5] Tests: Only need MPL Base Package Co-authored-by: Filipe --- recipes/wake-t/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wake-t/meta.yaml b/recipes/wake-t/meta.yaml index 42e62e04bd0c0..0bfb56c807b07 100644 --- a/recipes/wake-t/meta.yaml +++ b/recipes/wake-t/meta.yaml @@ -29,7 +29,7 @@ requirements: test: requires: - - matplotlib + - matplotlib-base - openpmd-viewer - python - pytest From a2bec2728eb59e2a00e8b144915dcf9177ab6ad2 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 20 Dec 2023 10:36:55 -0800 Subject: [PATCH 5/5] Python: 3.8+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ángel Ferran Pousa --- recipes/wake-t/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/wake-t/meta.yaml b/recipes/wake-t/meta.yaml index 0bfb56c807b07..7a35c94993e85 100644 --- a/recipes/wake-t/meta.yaml +++ b/recipes/wake-t/meta.yaml @@ -16,14 +16,14 @@ build: requirements: host: - pip - - python >=3.6 + - python >=3.8 - setuptools run: - aptools - numba - numpy - openpmd-api - - python >=3.6 + - python >=3.8 - scipy - tqdm