I am currently testing OpenMP in a big loop in my FORTRAN code. The code is part of a
simulation module which is called from a VB.NET user interface; this
interface also does the timing measurements. So I start a simulation,
and at the end the software shows me how long it took (I only write this
to show that for timing measurements I don't use wtime or cpu_time).
when I repeatedly start a simulation with my parallelized loop, I
always get different simulation times, reaching, in one example, from
1min30sec to almost 3min! The results are always correct.
different schedules for the loop (static, guided, dynamic), I tried to
calculate the chunks that are assigned to each thread manually (do i=1,N
-> do i=i_start,i_end), I tried to change the number of threads
taking part in the calculation of the loop - with no change of the
situation. When I remove the OpenMP directives from the code this does
not occur, so they must be the reason for this behavior.
My machine is a quadcore Intel Xeon CPU X3470 @2.93GHz with Win7 installed. I tried to run the program with both enabled and disabled multithreading (in the bios), however, this also didn't change anything.
Do you have any ideas what could go wrong? Thanks in advance for your thoughts.