-
Notifications
You must be signed in to change notification settings - Fork 37
Use sc_venv_template for tests on JUWELS #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pancetta
merged 6 commits into
Parallel-in-Time:master
from
brownbaerchen:sc_venv_template
Aug 5, 2025
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
|
|
||
| # See https://stackoverflow.com/a/28336473 | ||
| SOURCE_PATH="${BASH_SOURCE[0]:-${(%):-%x}}" | ||
|
|
||
| RELATIVE_PATH="$(dirname "$SOURCE_PATH")" | ||
| ABSOLUTE_PATH="$(realpath "${RELATIVE_PATH}")" | ||
|
|
||
| [[ "$0" != "${SOURCE_PATH}" ]] && echo "The activation script must be sourced, otherwise the virtual environment will not work." || ( echo "Vars script must be sourced." && exit 1) ; | ||
|
|
||
| source "${ABSOLUTE_PATH}"/config.sh | ||
| source "${ABSOLUTE_PATH}"/modules.sh | ||
|
|
||
| jutil env activate -p $COMPUTE_PROJECT | ||
|
|
||
| export PYTHONPATH="$(echo "${ENV_DIR}"/lib/python*/site-packages):${PYTHONPATH}" | ||
|
|
||
| source "${ENV_DIR}"/bin/activate | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| SOURCE_PATH="${BASH_SOURCE[0]:-${(%):-%x}}" | ||
brownbaerchen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Check if this script is sourced | ||
| [[ "$0" != "${SOURCE_PATH}" ]] && echo "Setting vars" || ( echo "Vars script must be sourced." && exit 1) ; | ||
| ## Determine location of this file | ||
| RELATIVE_PATH="$(dirname "$SOURCE_PATH")" | ||
| ABSOLUTE_PATH="$(realpath "${RELATIVE_PATH}")" | ||
| #################################### | ||
|
|
||
| ### User Configuration | ||
| export COMPUTE_PROJECT=ccstma | ||
| export ENV_NAME="$(basename "$ABSOLUTE_PATH")" # Default Name of the venv is the directory that contains this file | ||
| jutil env activate -p $COMPUTE_PROJECT | ||
| export ENV_DIR="${SCRATCH}"/.pySDC_venvs/venv_juwels_"${USER}" # Default location of this VENV is "./venv" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| module --force purge | ||
| module load Stages/2025 | ||
| module load GCC/13.3.0 | ||
| module load ParaStationMPI | ||
| module load NCCL | ||
| module load MPI-settings/CUDA | ||
| module load UCX-settings/RC-CUDA | ||
| module load Python | ||
| module load CuPy | ||
| module load FFTW | ||
| module load mpi4py | ||
| module load SciPy-Stack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Python venv for Juwels | ||
| ====================== | ||
|
|
||
| This is a version of the [JSC venv template](https://gitlab.jsc.fz-juelich.de/kesselheim1/sc_venv_template/-/tree/master) adapted to the cluster partition of the Juelich wizard for European leadership in science (JUWELS). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Add here the pip packages you would like to install on this virtual environment / kernel | ||
| numpy>=2.0 | ||
| matplotlib>=3.0 | ||
| dill>=0.2.6 | ||
| scipy>=1.14 | ||
| qmat | ||
| pytest-benchmark | ||
| coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/bash | ||
|
|
||
| SOURCE_PATH="${BASH_SOURCE[0]:-${(%):-%x}}" | ||
brownbaerchen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| RELATIVE_PATH="$(dirname "$SOURCE_PATH")" | ||
| ABSOLUTE_PATH="$(realpath "${RELATIVE_PATH}")" | ||
|
|
||
| source "${ABSOLUTE_PATH}"/config.sh | ||
| source "${ABSOLUTE_PATH}"/modules.sh | ||
|
|
||
| python3 -m venv --prompt "$ENV_NAME" --system-site-packages "${ENV_DIR}" | ||
|
|
||
| source "${ABSOLUTE_PATH}"/activate.sh | ||
|
|
||
| python3 -m pip install --upgrade pip | ||
|
|
||
| python3 -m pip install -r "${ABSOLUTE_PATH}"/requirements.txt | ||
|
|
||
| FFTW_LIBRARY_DIR="/p/software/juwels/stages/2025/software/FFTW/3.3.10-GCC-13.3.0/lib64/" python3 -m pip install git+https://github.com/brownbaerchen/mpi4py-fft.git@cupy_implementation | ||
|
|
||
| python3 -m pip install -e "${ABSOLUTE_PATH}"/../../ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.