Skip to content

Conversation

@jngrad
Copy link
Member

@jngrad jngrad commented Oct 17, 2025

By default, OpenMP applications use all CPU cores unless one exports environment variable OMP_NUM_THREADS=1, but doing so changes the behavior of Linux command nproc to return that variable value instead of the actual number of CPU cores. This can be confusing to users who aren't familiar with OpenMP parallelization. Most clusters will build ESPResSo 5.0 with OpenMP enabled for performance reasons. The latest version of ESPResSo automatically sets the number of OpenMP threads to 1 a few milliseconds after import espressomd is executed, if that environment variable wasn't set by the user. We therefore no longer have to alter environment variables in the user's Python environment.

@pm-blanco pm-blanco self-requested a review October 20, 2025 07:31
@pm-blanco pm-blanco added this to the pyMBEv2.0.0 milestone Oct 20, 2025
Copy link
Collaborator

@pm-blanco pm-blanco left a comment

Choose a reason for hiding this comment

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

Thank you for the maintenance work @jngrad. This is a very welcomed change!

@pm-blanco pm-blanco merged commit 9b22435 into pyMBE-dev:main Oct 20, 2025
4 checks passed
@jngrad jngrad deleted the eessi branch October 20, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants