- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have two problems that I have been struggling to get around with unfortunately no result. I would really appreciate your help on this.
I have a fortran code regarding some MDS simulations. The code was happily running on each core (not assigned any core to it but when I manually started 4 instances of the exe file each of them was running exclusively on each of the 4 cores of my PC hence having a 100% processor utilisation and 4 different simulations running on my machine). I have a windows XP 32bit machine with intel quad core processor.
When I passed the same exe file to some colleagues running windows 7 with an i5 670 processor, even when trying to run 1 instance of the code (1 exe file) their machine ran at a low single and multiple core utilisation. When we increased the number of instances on the same windows 7 machine the core utilisation remained the same (only around 10-25% of the total cpu performance was utilised while windows was starting to park some of the cores of the machine instead of having every core active and running at full performance - like my XP machine). So this is one of the problems emerging.
Further development of the code required a user input prior starting the simulations (unlike the previous version for which the code was taking all of its inputs via a txt file). The weird thing now is that after implementing the user input routine and having the code running the simulations -as before-, even on my XP machine the core utilisation is at 25% however the amount of instances I run. Even more strangely, when I increase the number of instances running to more than one - as I did with the previous version to have more cores working on different instances of the code- the core utilisation for each instance of the code running is divided so that the total overall processor utilisation remains at most at 25%. Leaving the simulation to run for some time, the processor utilisation drops to nearly zero activity.
I have really run out of ideas on how to tackle this problem. Even tried fiddling with the affinity options on windows task manager but it doesn't really do anything. I have Qparallel installed and attempted setting the affinity manually but unfortunately with no success - things were quite complicated to understand as my background is not on computing or software development.
I would love to hear your opinions and ideas on this.
Many Thanks
Antonis
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For /Qparallel, if you don't set par-affinity, you can set affinity as you choose for each platform by environment variable e.g.
SET KMP_AFFINITY=compact (or scatter,...)
Is this a laptop? Do you have sufficient RAM for your application to run without thrashing along with Windows 7? I have no experience with Win7 32-bit, if that's the one which exhibits a problem. In principle, Windows 7 SP1 may have improved self-scheduling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So if I just type SET KMP_AFFINITY=compact (0) is this supposed to run on the 1st core of my processor or do I have to do anything else to it? When I try the parallelisation commands it pops up error messages regarding a library missing - would really like to avoid that parallelism path due to my inexperience with it.
It is quite strange though how come the resource management of the computer is so poor when running the same code on Windows XP and Windows 7 as well as the deficiency of using the computer resources upon requesting a user input on both Operating Systems.
Antonis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/Qparallel links against the OpenMP dynamic library (libiomp5) by default, so it normally depends on your compiler environment being set to find it.
If you wanted to choose specific cores to run with libiomp5, you could list them out:
set KMP_AFFINITY="proclist=[0,1,2,3],explicit"
You could choose a single core for a single thread. While I doubt this was an intended usage for this environment variable, it may be worth an experiment, given the limited choice of similar options in Windows. If you use this method to run multiple applications together, you must run each in a different shell window, with a different core chosen, as you are attempting to over-ride the effort of Windows to schedule efficiently.
The usual reason for affinity setting is to improve thread cache locality, for the case where you take responsibility for not causing other applications to compete on the same cores.
Windows 7 has improved over XP in certain scheduling situations, but (depending on your application) there may be significant advantages in helping it out with affinity settings.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page