Skip to content
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

OMP_NUM_THREADS warning #2145

Closed
adiegel opened this issue Jul 9, 2021 · 4 comments
Closed

OMP_NUM_THREADS warning #2145

adiegel opened this issue Jul 9, 2021 · 4 comments

Comments

@adiegel
Copy link

adiegel commented Jul 9, 2021

Hi All,

I just updated my Firedrake install and now I am getting the warning message:

firedrake:WARNING OMP_NUM_THREADS is not set or is set to a value greater than 1, we suggest setting OMP_NUM_THREADS=1 to improve performance

How do I set the number of threads?

Thanks!

@rckirby
Copy link
Contributor

rckirby commented Jul 9, 2021 via email

@adiegel
Copy link
Author

adiegel commented Jul 9, 2021

Thanks, @rckirby. After your quick response, I found this numpy/numpy#11826 which gave me the exact command I needed.

@adiegel adiegel closed this as completed Jul 9, 2021
@hw454
Copy link

hw454 commented Oct 31, 2022

Hi I'm having this issue also. I can rectify it using: 'export OMP_NUMTHREADS=1' on command line but I'm having to do this everytime I activate the environment.
Is there a way to update the virtual environment so that this is set automatically every time I activate?

@connorjward
Copy link
Contributor

You could in theory modify the firedrake/bin/activate file to include the export OMP_NUM_THREADS=1 line, but the more standard way to do this is to add the line to your ~/.bashrc file (assuming you're using Bash). That way this variable gets set every time you launch a terminal and persists across Firedrake installations.

Also, it would be better to open a new issue referencing this one rather than posting at the bottom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants