PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

weird behavior

Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message

Joined: 02 Feb 2012
Posts: 59

PostPosted: Wed May 09, 2012 9:52 am    Post subject: weird behavior Reply with quote

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.
Back to top
View user's profile

Joined: 30 Jun 2004
Posts: 6745
Location: The Portland Group Inc.

PostPosted: Fri May 11, 2012 9:39 am    Post subject: Reply with quote

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © phpBB Group