I am a PhD student, and our lab is working to parallelize our finite element code using OpenMP. There are certain loops in which the calculations are not very computationally expensive, so these parallel loops only have a time savings if the number of iterations is very large; at fewer iterations, the parallel code is actually much slower than the sequential.
We are wondering if there is a way to circumvent some of the overhead associated with the parallel DO loops. For example, are there any statements that can be made only once at the beginning of the simulation, rather than every time the parallel loop is encountered? It is my understanding that this is not the case, but we would like to explore all possibilities to improve the run-time of the code.
Thank you for any information you can provide.