Skip to content
GitLab
  • Explore
  • Sign in
  • EDA Guides
  • eda-servers-guide
  • Wiki
  • cpu limit

cpu limit · Changes

Page history
Update cpu limit authored May 07, 2021 by Daniele Jahier Pagliari's avatar Daniele Jahier Pagliari
Hide whitespace changes
Inline Side-by-side
cpu-limit.md
View page @ 04394ef7
......@@ -4,3 +4,17 @@ As explained in the ["Monitoring Resources"](/monitoring) page, it is your respo
## Limiting CPU Threads with OpenMP
[OpenMP](https://www.openmp.org/) is a common shared-memory parallel programming library. For example, OpenMP is sometimes used by TensorFlow and PyTorch when training a model without GPU support.
If you find out that your code is using too many CPU threads, you can limit them setting the `OMP_NUM_THREADS` environment variable. On most command-line shells (e.g., bash, zsh, etc.) this is done with the following command:
```
export OMP_NUM_THREADS=8
```
The example above limits the number of threads to 8.
## Other Tools and Libraries
If you are currently working with another program or library that uses multi-threading, and you can share some code or some tips on how to limit the number of threads, please contact the sysadmins. We will be glad to add your suggestions to this page.
Clone repository
Home

Servers Information
Accounts
Connecting to the Servers
Storage Management and Quotas
Monitoring Resources
Software, Libraries and Data
  • Using Custom Software
  • Software Modules on Philae
  • Remote Code Deployment
  • Python Virtual Environments
  • EDA Technology Libraries
  • Shared Datasets
Miscellaneous Settings
  • Setting Up CUDA Libraries
  • Choosing which GPU to Use
  • Limiting GPU Memory
  • Limiting CPU Threads
Gitlab

Sidebar