Message boards :
Number crunching :
Will N-Body projects all use multiple CPUs?
Message board moderation
Author | Message |
---|---|
Send message Joined: 20 May 21 Posts: 20 Credit: 2,272,943 RAC: 2,715 |
My computer now does only N-Body Simulation tasks using 9 CPUs. It runs them fine, but puts all my other projects on hold. Now that MilkyWay@Home will only be doing N-Body tasks, I want to know if they will all use multiple CPUs like the ones I have been getting? S.Gaber Oldsmar, FL |
Send message Joined: 28 May 17 Posts: 76 Credit: 4,398,910,125 RAC: 255 |
N-body tasks are multi-threaded. You'll need to do something to micro manage them if you wish to run other projects along with MW N-Body. One method is using an app_config to limit the number of concurrent tasks and the amount of threads each task use for Milkyway N-Body. Another method is running multiple instances. -Use the main instance to run all your other projects and set the CPU usage in this instance to something other than 100%. Such as 50%. So all the other projects will use 50% of the CPU's available cores/threads. -Use the second instance to run only Milkyway N-Body tasks. Set the CPU usage in this instance to something other than 100%. In the example above, since the main instance is using 50% then you have up to 50% available for this instance. -Both instances CPU usage needs to add up to 100%. Going over 100% (Such as using 60% on one instance and 50% on another) will result in over utilizing the cores/threads in your system. -It's recommended to also use an app_config to set how many N-Body tasks MW uses on the second instance, as using more than 1 thread on those instances gives better performance. |
Send message Joined: 11 Jul 17 Posts: 20 Credit: 1,429,841,456 RAC: 0 |
Is n-body a legitimate multi-CPU project or is it just multiple WUs in one package? Does n-body use all allocated CPUs for the entire run? Or does it start using all CPUs and then as parts finish CPUs go idle and wasted until there's just one left running at the end? |
Send message Joined: 16 Mar 10 Posts: 213 Credit: 108,372,900 RAC: 3,950 |
Aurum, Note that I'm not a MilkyWay researcher or technician, but I'll have a go at this... Is n-body a legitimate multi-CPU project or is it just multiple WUs in one package?It is a multi-threaded application, using OpenMP. Given that (unlike Separation) it only produces one result, there are not multiple WUs in one package. And it'll quite happily send a task for the same WU to systems that allocate different numbers of threads (including one!) :-) Does n-body use all allocated CPUs for the entire run?I think it only uses one thread during set-up (the starting phase that takes about 30 seconds on most of my systems); it seems to use all allocated threads after that. Or does it start using all CPUs and then as parts finish CPUs go idle and wasted until there's just one left running at the end?It seems to try to apportion the required computational effort across all threads, but there are all sorts of reasons why seemingly identical blocks of work might take different amounts of time -- some of the time, threads will be idling if they are out of sync at key points. This becomes more noticeable as more threads are given to a single task, as it becomes more likely that the O/S will interrupt a (random?) thread to perform some necessary activity of its own :-) Hope that goes some way to answering your questions. Cheers - Al. |
Send message Joined: 30 Apr 15 Posts: 11 Credit: 246,523,412 RAC: 13,389 |
Thanks Al, not run n-body before in earnest so that explanation helps for when I do ! |
Send message Joined: 18 Aug 09 Posts: 123 Credit: 21,138,436 RAC: 2,056 |
No, on my system it grabbed all 15 free cores until I put in an app_config, but then BOINC went nuts. I had one group of 5 at 136%, next group at 70% and the last group was doing a pathetic 13% (rough numbers from memory) Took app config out, it went to 2 groups of 5 with better percentages. Waiting for the last task to finish. It's a bit like another project I am on, it needs 4 cores and its happy with that. Under that or over that and it goes nuts. So this one is a matter of finding the sweet spot for you system if you want to run 1 task or more at a time. |
Send message Joined: 8 May 09 Posts: 3339 Credit: 524,010,781 RAC: 0 |
No, on my system it grabbed all 15 free cores until I put in an app_config, but then BOINC went nuts. MilkyWay will use up to 16 cpu cores for the nBody tasks unless you use an app_config.xml file to restrict it. Th problems come in when MilkyWay uses all the cpu cores in your pc and then it often has 'issues'. |
©2024 Astroinformatics Group