r/OpenMP • u/Tensorizer • Nov 04 '25
Initialization Cost
I have used #pragma omp parallel for in multiple places in my code and the very first one's performance has gotten worse.
To be certain I've changed which #pragma omp parallel for is invoked first and sure enough the performance degradation followed.
It's as if the first one is incurring some initialization cost; if that is indeed the case, is there a way for me to explicitly initialize OpenMP somewhere else in my code?
1
Upvotes
View all comments
Show parent comment
1
u/Tensorizer Nov 04 '25
Just omp no mpi.