Message boards :
Number crunching :
N-Body Search Simulation using all CPUs
Message board moderation
Author | Message |
---|---|
Send message Joined: 1 Jan 08 Posts: 40 Credit: 1,676,165 RAC: 0 ![]() ![]() |
Hi all, The N-Body app is using all of my CPUs (4). I really only want it to use 1-2. Can I control this? |
Send message Joined: 1 Jan 08 Posts: 40 Credit: 1,676,165 RAC: 0 ![]() ![]() |
Hi all, Update: It just aborted with a computation error. |
![]() ![]() Send message Joined: 8 May 09 Posts: 3339 Credit: 524,010,781 RAC: 27 ![]() ![]() ![]() |
Hi all, Sort of, I am a Windows guy NOT a Linux guy so bear with me...open the Boinc Manager and then click on Tools and then computing preferences. Click on the processor usage tab and the second line up from the bottom that says: "on multiprocessor systems, use at most {_} % of the processors." Change it from the current 100 to 50 and your pc will only use half the total processing time available to crunch. |
Send message Joined: 1 Jan 08 Posts: 40 Credit: 1,676,165 RAC: 0 ![]() ![]() |
Thanks for the response. However, that control applies to all apps that are running. For instance, what I want to do is run MW on one CPU and run other apps on the remaining three CPUs. BTW, this is a Mac system, but your response still applied. Jim |
Send message Joined: 4 Sep 12 Posts: 219 Credit: 456,474 RAC: 0 ![]() ![]() |
The N-Body app is using all of my CPUs (4). I really only want it to use 1-2. Can I control this? Not currently. This is a BOINC feature, not a Milkyway feature, and it will vary a bit from BOINC version to version, but the best recipe I've been able to find is: Set 'No New Tasks' for the Milkyway project, and reduce the amount of CPU work (from all projects) that you have cached on your computer as far as possible. As Mikey suggested, change "on multiprocessor systems, use at most {_} % of the processors." to 50% Allow work fetch for Milkyway, and download as much new N-Body work as you can. Set 'No New Tasks' for Milkyway again. Set "on multiprocessor systems, use at most {_} % of the processors." back to 100% You should now have a bunch of Milkyway work on your machine which will compute using two cores, and BOINC should schedule other projects to use the other two cores. Rinse and repeat.... ------------------------------------------------------------------------------ The reason this works (if I've got the description right - it's been a while since I researched this, and I only researched it under Windows) is that whenever you download new work, the N-Body program is reset to use the number of CPUs BOINC was allowed to use at the time of the download. That's because the <app_version> block downloaded with the new work contains two distinct values: <max_ncpus> 4 [or 2] <cmdline>--nthreads 4 [or 2] The first controls how many cores BOINC will allocate to N-Body, and the second controls how much CPU power N-Body will actually use (they need to be the same for efficient cunching). If you have cpu usage set to 50% when you request new work, both will be set to 2, and you have the slack for other projects that you want. As soon as you download new N-Body work while cpu usage is set to 100%, both numbers will jump up to 4, and you'll be back in your current position. |
Send message Joined: 1 Jan 08 Posts: 40 Credit: 1,676,165 RAC: 0 ![]() ![]() |
Thanks, Jim |
![]() ![]() Send message Joined: 8 May 09 Posts: 3339 Credit: 524,010,781 RAC: 27 ![]() ![]() ![]() |
Can you set this thru a cc_config.xml or app_config.xml file you put inside the project directory? So it tells the project to ONLY EVER use the number specified. |
Send message Joined: 4 Sep 12 Posts: 219 Credit: 456,474 RAC: 0 ![]() ![]() |
------------------------------------------------------------------------------ No, you can't. cc_config.xml is global across all projects - no use for single-project stuff. app_config.xml works - individually - for each separate app supplied by a single project - so it would be exactly the right place to do this, if possible. The <max_cpus> might work, but at the moment there's no way of controlling <cmdline> from app_config. I did ask David Anderson to add the feature, for precisely this reason, but he declined - saying (a) he didn't think it would work [I disagree, because I've done the same thing via an app_info, several times on several projects], and (b) because he views app_config as a temporary kludge until greater application control is added to the Manager - that may be the BOINC 8 reference you were half-remembering in the News thread a couple of days ago. So, for the time being, we're stuck half-way, with an app_config that works within limits: but won't be extended until some vapourware that I haven't seen any sign of yet comes along. Unless project admins gang up to put some pressure on David to give it a try? I believe the original impetus for app_config.xml came from World Community Grid - maybe it would be worth asking there, if anyone here is also a member there? (I'm not) ------------------------------------------------------------------------------ I tried the 'fetch new work while the number of CPUs is restricted' trick I described with development BOINC v7.2.10 - and it worked fine. But I found I could only get a limited amount of Milkyway work at a time ("You have reached a limit for the number of tasks in progress"), which made it very tedious. Having proved the point (to my personal satisfaction, at least), I gave up, and my laptop is now crunching Milkyway of all cores for a while, then switching away and running four separate tasks from other projects. That doesn't need babysitting, and it all comes out the same in the end. |
![]() ![]() Send message Joined: 8 May 09 Posts: 3339 Credit: 524,010,781 RAC: 27 ![]() ![]() ![]() |
------------------------------------------------------------------------------ I am at WCG but do not crunch the cpu units here, I was thinking I could start but not if it can't be controlled better. Thanks!! |
©2024 Astroinformatics Group