Click here to Skip to main content
14,301,387 members

C / C++ / MFC

 
AnswerRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan8-Feb-19 22:36
protectorRichard MacCutchan8-Feb-19 22:36 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_9-Feb-19 4:14
memberVaclav_9-Feb-19 4:14 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan9-Feb-19 6:40
protectorRichard MacCutchan9-Feb-19 6:40 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_9-Feb-19 7:17
memberVaclav_9-Feb-19 7:17 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
k50549-Feb-19 8:20
memberk50549-Feb-19 8:20 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
k50549-Feb-19 8:38
memberk50549-Feb-19 8:38 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_9-Feb-19 13:11
memberVaclav_9-Feb-19 13:11 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
leon de boer9-Feb-19 16:52
memberleon de boer9-Feb-19 16:52 
OpenMP works out how many CPU core you have at runtime.
It isn't a fixed answer and there may be cores unavailable to you and there isn't a thing you can do about it.

This call returns the number of cores available to you at time of call
int omp_get_num_procs();

Inside Windows or Linux certain threads may have a core locked with core affinity and you can sit there and whistle dixie the OS is never going to give OpenMP that core.

OpenMP is not the OS and is not in control of core scheduling it asks and locks the maximum the O/S will allow.

So if you aren't getting all the cores you need to look at the O/S level.
google something like "Affinity control outside OpenMP"
In vino veritas


modified 9-Feb-19 22:59pm.

GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Vaclav_10-Feb-19 4:34
memberVaclav_10-Feb-19 4:34 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan10-Feb-19 6:42
protectorRichard MacCutchan10-Feb-19 6:42 
GeneralRe: Using OpenMP - #of CPU or # of threads ? Pin
Richard MacCutchan9-Feb-19 22:42
protectorRichard MacCutchan9-Feb-19 22:42 
QuestionC coding to evaluate an arithmetic expression Pin
Member 119317847-Feb-19 12:08
memberMember 119317847-Feb-19 12:08 
AnswerRe: C coding to evaluate an arithmetic expression Pin
jeron17-Feb-19 14:16
memberjeron17-Feb-19 14:16 
AnswerRe: C coding to evaluate an arithmetic expression Pin
leon de boer7-Feb-19 17:52
memberleon de boer7-Feb-19 17:52 
AnswerRe: C coding to evaluate an arithmetic expression Pin
CPallini7-Feb-19 23:21
mveCPallini7-Feb-19 23:21 
RantWhy "make"? Pin
Vaclav_7-Feb-19 5:28
memberVaclav_7-Feb-19 5:28 
GeneralRe: Why "make"? Pin
Richard MacCutchan7-Feb-19 6:00
protectorRichard MacCutchan7-Feb-19 6:00 
GeneralRe: Why "make"? Pin
k50547-Feb-19 7:07
memberk50547-Feb-19 7:07 
GeneralRe: Why "make"? Pin
leon de boer7-Feb-19 17:13
memberleon de boer7-Feb-19 17:13 
JokeRe: Why "make"? Pin
Richard MacCutchan7-Feb-19 22:19
protectorRichard MacCutchan7-Feb-19 22:19 
GeneralRe: Why "make"? Pin
CPallini7-Feb-19 23:05
mveCPallini7-Feb-19 23:05 
GeneralRe: Why "make"? Pin
Dar Brett8-Feb-19 16:02
memberDar Brett8-Feb-19 16:02 
GeneralRe: Why "make"? Pin
CPallini9-Feb-19 0:22
mveCPallini9-Feb-19 0:22 
Questionmemory device context coordinates Pin
Alexander Kindel6-Feb-19 12:12
memberAlexander Kindel6-Feb-19 12:12 
AnswerRe: memory device context coordinates Pin
speedbump996-Feb-19 13:30
memberspeedbump996-Feb-19 13:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.