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

Parallelization only part-time #16

Closed
Optiuse opened this issue Feb 19, 2020 · 0 comments
Closed

Parallelization only part-time #16

Optiuse opened this issue Feb 19, 2020 · 0 comments

Comments

@Optiuse
Copy link

Optiuse commented Feb 19, 2020

Hello,

when I want multithreaded parallel function evaluations for 8 Threads i do this:
#define OPTIM_USE_OMP
omp_set_dynamic(false); // omp setting
omp_set_num_threads(8); // omp setting

I have very expensive functions and some parameters take much longer than others. The problem is that often not all threads are used. Overall, this makes the optimization much longer because the CPU is often only used to 1/8 of its capacity. Therefore the effect of parallelization is only part-time.
It gives the impression that the parallelization is interrupted as soon as a "slow function execution" occurs in the overall process. As if the execution of new threads would have to wait.

What is the reason for this and is there a possibility that all 8 threads are always used and therefore the cpu is used at full capacity? This would significantly accelerate the total optimisation process.

Greetings

@kthohr kthohr closed this as completed Sep 12, 2020
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

2 participants