Ticket #2808 (closed: fixed)
Property for number of threads to use
Reported by: | Peter Peterson | Owned by: | Vickie Lynch |
---|---|---|---|
Priority: | minor | Milestone: | Iteration 29 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description
As many developer have hyper-threading turned on, and users may want to run more than one instance of mantid on a multi-user machine, add a new property to limit the total number of threads that openMP will use. OpenMP has the ability built in described here that limits the number of threads in the next openmp call. Otherwise OPENMP_NUM_THREADS is an environment variable that will limit the the application will use altogether.
Change History
comment:6 Changed 9 years ago by Vickie Lynch
- Status changed from accepted to verify
- Resolution set to fixed
Added variable to Properties File wiki page
comment:7 Changed 9 years ago by Peter Peterson
- Status changed from verify to verifying
- Tester set to Peter Peterson
comment:8 Changed 9 years ago by Peter Peterson
- Status changed from verifying to reopened
- Resolution fixed deleted
I reviewed the source and it looks good. The one dangling issue is in MultiThreaded.h the macro
#define PARALLEL_SET_NUM_THREADS omp_set_num_threads(MaxCores);
requires that callers have a variable in scope called MaxCores. Modify the macro to take the variable as an argument and modify Algorithm.cpp, then this ticket can be closed.
comment:10 Changed 9 years ago by Vickie Lynch
comment:11 Changed 9 years ago by Vickie Lynch
- Status changed from accepted to verify
- Resolution set to fixed
I ran LoadEventNexus with/without MultiThreaded.MaxCores = 2 and it used the correct number of cores.
comment:12 Changed 9 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester changed from Peter Peterson to Martyn Gigg
comment:13 Changed 9 years ago by Martyn Gigg
- Status changed from verifying to closed
Confirmed that the property causes the correct number of cores to be used and the macro change is there.
comment:14 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 3655
Bulk move of tickets at the end of iteration 28