Skip to content

add patch to recent LAMMPS easyconfigs to ensure that system Python packages are used and not updated in Python virtual environment#25127

Merged
laraPPr merged 2 commits intoeasybuilders:developfrom
lorisercole:fix/lammps-venv
Jan 27, 2026
Merged

add patch to recent LAMMPS easyconfigs to ensure that system Python packages are used and not updated in Python virtual environment#25127
laraPPr merged 2 commits intoeasybuilders:developfrom
lorisercole:fix/lammps-venv

Conversation

@lorisercole
Copy link
Copy Markdown
Contributor

LAMMPS creates a virtual environment to build a python wheel of its python interface. The required packages are not pinned, causing possible future incompatibilities since pip downloads the latest versions. This patch ensures that the system packages installed by EasyBuild are used in the virtual environment whenever possible, and deactivates automatic updates by pip.

Furthermore, it constrains the dependency build<1.4 that would otherwise cause build errors for 2023a and 2023b toolchains.
Fixes #25089

LAMMPS creates a virtual environment to build a python wheel of its
python interface. The required packages are not pinned, causing possible
future incompatibilities since pip downloads the latest versions.
This patch ensures that the system packages installed by EasyBuild are
used in the virtual environment whenever possible, and deactivates
automatic updates by pip.

Furthermore, it constrains the dependency `build<1.4` that would
otherwise cause build errors for `2023a` and `2023b` toolchains.
Fixes easybuilders#25089

Signed-off-by: Loris Ercole <[email protected]>
@github-actions github-actions Bot added 2023a 2023b 2024a issues & PRs related to 2024a common toolchains change labels Jan 22, 2026
Comment thread easybuild/easyconfigs/l/LAMMPS/LAMMPS-2Aug2023_python_venv.patch
@lorisercole lorisercole requested a review from laraPPr January 23, 2026 18:04
@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 26, 2026

@boegelbot please test @ jsc-zen3 EB_ARGS="LAMMPS-22Jul2025-foss-2024a-kokkos.eb LAMMPS-29Aug2024-foss-2023b-kokkos.eb LAMMPS-29Aug2024_update2-foss-2023a-kokkos.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb"

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 26, 2026

@boegelbot please test @ jsc-zen3-a100 EB_ARGS="LAMMPS-2Aug2023_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-29Aug2024_update2-foss-2023b-kokkos-CUDA-12.4.0.eb LAMMPS-28Oct2024-foss-2023a-kokkos-mace-CUDA-12.1.1.eb LAMMPS-22Jul2025-foss-2024a-kokkos-CUDA-12.6.0.eb"

@boegelbot
Copy link
Copy Markdown
Collaborator

@laraPPr: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=25127 EB_ARGS="LAMMPS-2Aug2023_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-29Aug2024_update2-foss-2023b-kokkos-CUDA-12.4.0.eb LAMMPS-28Oct2024-foss-2023a-kokkos-mace-CUDA-12.1.1.eb LAMMPS-22Jul2025-foss-2024a-kokkos-CUDA-12.6.0.eb" EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_25127 --ntasks=8 --partition=jsczen3g --gres=gpu:1 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 9492

Test results coming soon (I hope)...

Details

- notification for comment with ID 3799914275 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 6 out of 6 (total: 6 hours 53 mins 37 secs) (6 easyconfigs in total)
jsczen3g1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.7, x86_64, AMD EPYC-Milan Processor (zen3), 1 x NVIDIA NVIDIA A100 80GB PCIe, 590.44.01, Python 3.9.23
See https://gist.github.com/boegelbot/31b64b3efad6e87f9135dddbb8a1d00a for a full test report.

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

@boegelbot please test @ jsc-zen3-a100 EB_ARGS="LAMMPS-2Aug2023_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-29Aug2024_update2-foss-2023b-kokkos-CUDA-12.4.0.eb LAMMPS-28Oct2024-foss-2023a-kokkos-mace-CUDA-12.1.1.eb LAMMPS-22Jul2025-foss-2024a-kokkos-CUDA-12.6.0.eb"

@boegelbot
Copy link
Copy Markdown
Collaborator

@laraPPr: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=25127 EB_ARGS="LAMMPS-2Aug2023_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-29Aug2024_update2-foss-2023b-kokkos-CUDA-12.4.0.eb LAMMPS-28Oct2024-foss-2023a-kokkos-mace-CUDA-12.1.1.eb LAMMPS-22Jul2025-foss-2024a-kokkos-CUDA-12.6.0.eb" EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_25127 --ntasks=8 --partition=jsczen3g --gres=gpu:1 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 9498

Test results coming soon (I hope)...

Details

- notification for comment with ID 3803927060 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@lorisercole
Copy link
Copy Markdown
Contributor Author

lorisercole commented Jan 27, 2026

@boegelbot please test @ jsc-zen3-a100 EB_ARGS="LAMMPS-2Aug2023_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos-CUDA-12.6.0.eb LAMMPS-29Aug2024_update2-foss-2023b-kokkos-CUDA-12.4.0.eb LAMMPS-28Oct2024-foss-2023a-kokkos-mace-CUDA-12.1.1.eb LAMMPS-22Jul2025-foss-2024a-kokkos-CUDA-12.6.0.eb"

Looks like these have already been tested successfully by the bot...
The CPU ones are missing

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

Ah yes your correct. sorry thought only the CPU ran. will trigger the other command again.

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

@boegelbot please test @ jsc-zen3 EB_ARGS="LAMMPS-22Jul2025-foss-2024a-kokkos.eb LAMMPS-29Aug2024-foss-2023b-kokkos.eb LAMMPS-29Aug2024_update2-foss-2023a-kokkos.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb"

@boegelbot
Copy link
Copy Markdown
Collaborator

@laraPPr: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=25127 EB_ARGS="LAMMPS-22Jul2025-foss-2024a-kokkos.eb LAMMPS-29Aug2024-foss-2023b-kokkos.eb LAMMPS-29Aug2024_update2-foss-2023a-kokkos.eb LAMMPS-29Aug2024_update2-foss-2024a-kokkos.eb LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb" EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_25127 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 9499

Test results coming soon (I hope)...

Details

- notification for comment with ID 3804141008 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

Test report by @laraPPr
SUCCESS
Build succeeded for 5 out of 5 (total: 1 hour 37 mins 54 secs) (5 easyconfigs in total)
node3537.doduo.os - Linux RHEL 9.6 (Plow), x86_64, AMD EPYC 7552 48-Core Processor, Python 3.9.21
See https://gist.github.com/laraPPr/b6116e6036fc6eaf5cc35b9a8d461bde for a full test report.

Copy link
Copy Markdown
Contributor

@laraPPr laraPPr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@laraPPr laraPPr added this to the next release (5.2.1?) milestone Jan 27, 2026
@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 5 out of 5 (total: 2 hours 29 mins 26 secs) (5 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.7, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.23
See https://gist.github.com/boegelbot/602b2bcb02dddebbbfde3fb12811d35f for a full test report.

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

Test report by @laraPPr
FAILED
Build succeeded for 5 out of 6 (6 easyconfigs in total)
node4303.litleo.os - Linux RHEL 9.6 (Plow), x86_64, AMD EPYC 9454P 48-Core Processor, 1 x NVIDIA NVIDIA H100 NVL, 580.95.05, Python 3.9.21
See https://gist.github.com/laraPPr/239c3d1665baacd29609520cb21669f2 for a full test report.

@lorisercole
Copy link
Copy Markdown
Contributor Author

lorisercole commented Jan 27, 2026

Test report by @laraPPr FAILED Build succeeded for 5 out of 6 (6 easyconfigs in total) node4303.litleo.os - Linux RHEL 9.6 (Plow), x86_64, AMD EPYC 9454P 48-Core Processor, 1 x NVIDIA NVIDIA H100 NVL, 580.95.05, Python 3.9.21 See https://gist.github.com/laraPPr/239c3d1665baacd29609520cb21669f2 for a full test report.

Weird that this time one test failed. But I notice that this time it used EasyBuild 5.1.2 instead of 5.2.1 or 5.2.0 like in the successful runs. Maybe that's the reason?

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

Ah forgot to update the easybuild version on that cluster, Thanks for pointing it out. I though it might have something to do with the core pinning on our cluster. So it is running again right now.

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

Test report by @laraPPr
SUCCESS
Build succeeded for 1 out of 1 (total: 48 mins 46 secs) (1 easyconfigs in total)
node4303.litleo.os - Linux RHEL 9.6 (Plow), x86_64, AMD EPYC 9454P 48-Core Processor, 1 x NVIDIA NVIDIA H100 NVL, 580.95.05, Python 3.9.21
See https://gist.github.com/laraPPr/88e8a45515b120a8930ab56413a8013c for a full test report.

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Jan 27, 2026

Going in, thanks @lorisercole!

@laraPPr laraPPr merged commit 169646c into easybuilders:develop Jan 27, 2026
8 checks passed
@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 6 out of 6 (total: 6 hours 52 mins 50 secs) (6 easyconfigs in total)
jsczen3g1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.7, x86_64, AMD EPYC-Milan Processor (zen3), 1 x NVIDIA NVIDIA A100 80GB PCIe, 590.44.01, Python 3.9.23
See https://gist.github.com/boegelbot/75636fb1513f292e78f871076a1cd0e8 for a full test report.

@boegel boegel changed the title Patch LAMMPS python venv setup add patch to recent LAMMPS easyconfigs to ensure that system Python packages are used and not updated in Python virtual environment Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2023a 2023b 2024a issues & PRs related to 2024a common toolchains change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure in LAMMPS (e.g. LAMMPS-29Aug2024-foss-2023b-kokkos.eb) due to usage of venv

3 participants