- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any way to restrict the number of threads/processors used by numpy linked to MKL? I would like to restrict it to one processor, as the final implemenation of the program will be run in parallel, so each instance would only be effectively using one processor. I need to get some estimated times for one processor as i will be comparing the performance to alternative options that are single-threaded (but would be run in parallel on my setup as well).
I just don't have access to the full setup right now, so i'm trying to benchmark them on a different setup, so i need to be able to compare the run times in an apple to apples environment (one processor each). I've tried settting os.environ['OMP_NUM_THREADS'] = '1', but the program still runs on both processors.
Thanks!
I just don't have access to the full setup right now, so i'm trying to benchmark them on a different setup, so i need to be able to compare the run times in an apple to apples environment (one processor each). I've tried settting os.environ['OMP_NUM_THREADS'] = '1', but the program still runs on both processors.
Thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you don'tneed parallel work ofMKL just link with sequential MKLlibrary instead of thread-library.
If you don'tneed parallel work ofMKL just link with sequential MKLlibrary instead of thread-library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, but i'm not that familiar with MKL (the library came pre-linked in the Enthought python distro that I am using). Could you point me to a quick reference on how to do this? Is it a flag that i can just include in my python script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Linux:
In your config files please find mkl_intel_thread and substitute it to mkl_sequential
It maybe something like -lmkl_intel_thread or with full name of library libmkl_intel_thread
In your config files please find mkl_intel_thread and substitute it to mkl_sequential
It maybe something like -lmkl_intel_thread or with full name of library libmkl_intel_thread
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page