weird behavior

Running Windows 7 64-bit, Visual Studio 2008, PGI VF. App built from an old R&D code using x64 and a release version.

I had revised my code to the point of deciding to turn on auto-parallelization to see what happened. Compiled with no problem and parallelization output noted some loops were parallelized and some not ---- no surprise there.

Ran the app and it cruised along fine. Looking at TaskManager I noted the app process was using only ~40% because I had a “folding app” running the background at low priority. I stopped the folding app to get a better idea of my app alone but my app seemed to stall. TaskManger showed a near zero load on the cpu and the processes tab showed little to nothing running, my app still appeared there. So I restarted folding and app resumed its calculation. Can toggle folding on and off and similar behavior reoccurs.

Went back and recompiled without auto-parallelization and my app runs normally, with or without folding.

I figured maybe the process with auto-parallelization might be related to some interaction with VS where I was running it so I stopped VS. Started a command window and started the executable build with auto-parallelization. Behavior was same as before by toggling folding. VS doesn’t appear to be an issue.

By the way, I’ve set the priority to high for my app, no difference. Folding when it is on is set to the lowest possible priority.

Folding appears to be just an app that demands cpu time and for some reason allows auto-parallelization version of my app to run. I’ve verified that statement by starting at least one other application (a registry organizer) which also seem to allow my app to run. In this case the auto-parallelization version of the app run at ~95% cpu load and uses all 8 cores (4 real and 4 virtual).

I’m stumped as to why this behavior should be observed. The point being that for a real science run of my app, I would want to run nothing but my app to get the best performance.

Hi deepow,

I tried your code and did see the expected parallelization on both Windows and Linux. Though, the behaviour of “-Mconcur” is to use the environment variables “OMP_NUM_THREADS” or “NCPUS” to set the number of threads. If neither are set, then only a single thread is used. You can change this behaviour by using the sub-option “-Mconcur=allcores”,if OMP_NUM_THREADS or NCPUS is not set, the default is to use all available cores on a system.

  • Mat