Welcome to MilkyWay@home

nbody: Trying to run on 2 cores, but downloading 4 core tasks

Message boards : Number crunching : nbody: Trying to run on 2 cores, but downloading 4 core tasks
Message board moderation

To post messages, you must log in.

AuthorMessage
Bill
Avatar

Send message
Joined: 8 Jan 18
Posts: 44
Credit: 43,796,723
RAC: 2,502
Message 70065 - Posted: 29 Aug 2020, 2:20:06 UTC

So I've decided to start running the Nbody tasks again. I have a 4 core CPU that has 2 GPUs. I want to limit Nbody to run on 2 cores maximum so my GPUs stay busy. I added the following to my app_config file (my whole app_config included, just in case, but the nbody section is what I added):

<app_config>

	<app>
		<name>milkyway</name>
		<gpu_versions>
			<gpu_usage>0.5</gpu_usage>
			<cpu_usage>0.5</cpu_usage>
		</gpu_versions>
	</app>
	<app_version>
		<app_name>milkyway_nbody</app_name>
			<plan_class>mt</plan_class>
			<cmdline>--nthreads 2</cmdline>
	</app_version>
</app_config>

However, when I reloaded my app_config, I have downloaded 4 CPU Nbody tasks. I'm missing something obvious, I just don't know what it is. Any ideas?

On a side note, I think I observed these 4 CPU Nbody tasks running while my 2 GPUs were also running...so 4 GPU tasks (using a sum of 2 CPUs), and a 4 CPU task. The Nbody task seemed to run slow, but once I suspended GPU tasks, the nbody sped up. I haven't had a chance to experiment with it more, but I'm curious if anyone else has noticed this.
ID: 70065 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile mikey
Avatar

Send message
Joined: 8 May 09
Posts: 3339
Credit: 524,010,781
RAC: 0
Message 70066 - Posted: 29 Aug 2020, 2:42:09 UTC - in response to Message 70065.  

So I've decided to start running the Nbody tasks again. I have a 4 core CPU that has 2 GPUs. I want to limit Nbody to run on 2 cores maximum so my GPUs stay busy. I added the following to my app_config file (my whole app_config included, just in case, but the nbody section is what I added):

<app_config>

	<app>
		<name>milkyway</name>
		<gpu_versions>
			<gpu_usage>0.5</gpu_usage>
			<cpu_usage>0.5</cpu_usage>
		</gpu_versions>
	</app>
	<app_version>
		<app_name>milkyway_nbody</app_name>
			<plan_class>mt</plan_class>
			<cmdline>--nthreads 2</cmdline>
	</app_version>
</app_config>

However, when I reloaded my app_config, I have downloaded 4 CPU Nbody tasks. I'm missing something obvious, I just don't know what it is. Any ideas?

On a side note, I think I observed these 4 CPU Nbody tasks running while my 2 GPUs were also running...so 4 GPU tasks (using a sum of 2 CPUs), and a 4 CPU task. The Nbody task seemed to run slow, but once I suspended GPU tasks, the nbody sped up. I haven't had a chance to experiment with it more, but I'm curious if anyone else has noticed this.


N-body tasks are cpu only and by default are multi-threading while the gpu tasks are Seperation tasks and by default use some part of a gpu depending on the gpu.
0.5 times 4 equals 2 cores, that leaves zero cores for your gpu's to use so of course the cpu units will speed up if the gpu's stop.

Also specifing 0.5 cpu usage is only a suggestion, the app that the Project writes is the determining factor of how much of a cpu core it will use. Most do not use a full core so it's not usually a problem but in some cases it is and no app or whatever file can overwrite it.
ID: 70066 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Bill
Avatar

Send message
Joined: 8 Jan 18
Posts: 44
Credit: 43,796,723
RAC: 2,502
Message 70071 - Posted: 29 Aug 2020, 3:28:39 UTC - in response to Message 70066.  

Mikey, the section of app_config I just added was everything contained in the <app_version> section. Everything else was there prior to me re-engaging with nbody. I don't understand why I have specified 2 cores max for nbody, but for some reason I'm still downloading 4 core tasks. I don't think this has nothing to do with my GPUs nor the separation tasks.
ID: 70071 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile mikey
Avatar

Send message
Joined: 8 May 09
Posts: 3339
Credit: 524,010,781
RAC: 0
Message 70073 - Posted: 29 Aug 2020, 11:09:33 UTC - in response to Message 70071.  

Mikey, the section of app_config I just added was everything contained in the <app_version> section. Everything else was there prior to me re-engaging with nbody. I don't understand why I have specified 2 cores max for nbody, but for some reason I'm still downloading 4 core tasks. I don't think this has nothing to do with my GPUs nor the separation tasks.


Probably because Boinc is pre-fetching tasks so you don't run out of work, the newer versions of Boinc do that even with a resource share of zero.
ID: 70073 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile Keith Myers
Avatar

Send message
Joined: 24 Jan 11
Posts: 715
Credit: 555,976,612
RAC: 46,494
Message 70079 - Posted: 29 Aug 2020, 20:14:17 UTC - in response to Message 70066.  

So I've decided to start running the Nbody tasks again. I have a 4 core CPU that has 2 GPUs. I want to limit Nbody to run on 2 cores maximum so my GPUs stay busy. I added the following to my app_config file (my whole app_config included, just in case, but the nbody section is what I added):

<app_config>

	<app>
		<name>milkyway</name>
		<gpu_versions>
			<gpu_usage>0.5</gpu_usage>
			<cpu_usage>0.5</cpu_usage>
		</gpu_versions>
	</app>
	<app_version>
		<app_name>milkyway_nbody</app_name>
			<plan_class>mt</plan_class>
			<cmdline>--nthreads 2</cmdline>
	</app_version>
</app_config>

However, when I reloaded my app_config, I have downloaded 4 CPU Nbody tasks. I'm missing something obvious, I just don't know what it is. Any ideas?

On a side note, I think I observed these 4 CPU Nbody tasks running while my 2 GPUs were also running...so 4 GPU tasks (using a sum of 2 CPUs), and a 4 CPU task. The Nbody task seemed to run slow, but once I suspended GPU tasks, the nbody sped up. I haven't had a chance to experiment with it more, but I'm curious if anyone else has noticed this.


N-body tasks are cpu only and by default are multi-threading while the gpu tasks are Seperation tasks and by default use some part of a gpu depending on the gpu.
0.5 times 4 equals 2 cores, that leaves zero cores for your gpu's to use so of course the cpu units will speed up if the gpu's stop.

Also specifing 0.5 cpu usage is only a suggestion, the app that the Project writes is the determining factor of how much of a cpu core it will use. Most do not use a full core so it's not usually a problem but in some cases it is and no app or whatever file can overwrite it.

Try this version of your app_config.

<app_config>

	<app>
		<name>milkyway</name>
		<gpu_versions>
			<gpu_usage>0.5</gpu_usage>
			<cpu_usage>0.5</cpu_usage>
		</gpu_versions>
	</app>
	<app_version>
		<app_name>milkyway_nbody</app_name>
                <max_concurrent>1</max_concurrent>
			<plan_class>mt</plan_class>
                        <avg_ncpus>2</avg_ncpus>
			<cmdline>--nthreads 2</cmdline>
        </app_version>
</app_config>

ID: 70079 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Bill
Avatar

Send message
Joined: 8 Jan 18
Posts: 44
Credit: 43,796,723
RAC: 2,502
Message 70089 - Posted: 31 Aug 2020, 3:12:06 UTC - in response to Message 70079.  

Keith, no dice. After inputting your suggestion, I set MW@H to NNT, ran through all CPU tasks (I had no other tasks from other projects, fwiw). Once I started accepting new tasks again I kept getting 4 core nbody.
ID: 70089 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile mikey
Avatar

Send message
Joined: 8 May 09
Posts: 3339
Credit: 524,010,781
RAC: 0
Message 70090 - Posted: 31 Aug 2020, 10:37:47 UTC - in response to Message 70089.  

Keith, no dice. After inputting your suggestion, I set MW@H to NNT, ran through all CPU tasks (I had no other tasks from other projects, fwiw). Once I started accepting new tasks again I kept getting 4 core nbody.


Try this....set MW to no new tasks and get rid of all the n-body tasks by either aborting them or running them, then set your pc to use only 50% of the cpu's and allow more n-body tasks and see if they don't come in as 2 core tasks. Once your cache is full turn off all new n-body tasks again and change the pc to use all 4 cpu cores and your pc should happily crunch the n-body tasks with only 2 cpu cores. Yes it's a pain in the butt but it should work until you can figure out the right app_config file setting.
ID: 70090 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Bill
Avatar

Send message
Joined: 8 Jan 18
Posts: 44
Credit: 43,796,723
RAC: 2,502
Message 70092 - Posted: 31 Aug 2020, 12:14:44 UTC - in response to Message 70090.  

Keith, no dice. After inputting your suggestion, I set MW@H to NNT, ran through all CPU tasks (I had no other tasks from other projects, fwiw). Once I started accepting new tasks again I kept getting 4 core nbody.


Try this....set MW to no new tasks and get rid of all the n-body tasks by either aborting them or running them, then set your pc to use only 50% of the cpu's and allow more n-body tasks and see if they don't come in as 2 core tasks. Once your cache is full turn off all new n-body tasks again and change the pc to use all 4 cpu cores and your pc should happily crunch the n-body tasks with only 2 cpu cores. Yes it's a pain in the butt but it should work until you can figure out the right app_config file setting.
I could try that, but I am running other projects, and I'm using all four cores. I haven't limited my core usage before on this computer and I don't want to start now. Additionally, I don't have the time to babysit this computer.

Is there a list of command line options for this application? I know SETI@Home did with their MB and AP applications.
ID: 70092 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Jim1348

Send message
Joined: 9 Jul 17
Posts: 100
Credit: 16,967,906
RAC: 0
Message 70093 - Posted: 31 Aug 2020, 13:05:53 UTC - in response to Message 70065.  
Last modified: 31 Aug 2020, 13:07:10 UTC

So I've decided to start running the Nbody tasks again. I have a 4 core CPU that has 2 GPUs. I want to limit Nbody to run on 2 cores maximum so my GPUs stay busy.

This works for me for the CPU. You can add the GPU part.
You will need a reboot (or restarting BOINC) for it to take effect for any work already downloaded.

<app_config>
  <app>
    <app_version>
    <app_name>milkyway_nbody</app_name>
    <plan_class>mt</plan_class>
    <avg_ncpus>2</avg_ncpus>
  </app_version>
</app_config>
ID: 70093 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Bill
Avatar

Send message
Joined: 8 Jan 18
Posts: 44
Credit: 43,796,723
RAC: 2,502
Message 70099 - Posted: 1 Sep 2020, 12:45:19 UTC - in response to Message 70093.  

Unfortunately, this did not work. Steps to reproduce:
1. BOINC running. MW set to NNT.
2. Edit app_config as Jim1348 mentions above. Save and close.
3. Continue running BOINC until all MW tasks are completed. I did not reload the app_config file at this time.
4. Once all MW tasks have been returned, exited BOINC.
5. After waiting a minute, re-loaded BOINC.
6. Set MW to receive tasks, and 4-core Nbody tasks were downloaded.

Additionally, I still have the 0.5 CPU/0.5 GPU setting for the separation tasks. When I started recieving new files again, it is running five tasks total (4 separation tasks, 2 per GPU), and one nbody task. That doesn't seem right, either.
ID: 70099 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
alanb1951

Send message
Joined: 16 Mar 10
Posts: 213
Credit: 108,394,388
RAC: 3,530
Message 70100 - Posted: 2 Sep 2020, 2:50:08 UTC - in response to Message 70099.  

Unfortunately, this did not work. Steps to reproduce:
1. BOINC running. MW set to NNT.
2. Edit app_config as Jim1348 mentions above. Save and close.
3. Continue running BOINC until all MW tasks are completed. I did not reload the app_config file at this time.
4. Once all MW tasks have been returned, exited BOINC.
5. After waiting a minute, re-loaded BOINC.
6. Set MW to receive tasks, and 4-core Nbody tasks were downloaded.

Additionally, I still have the 0.5 CPU/0.5 GPU setting for the separation tasks. When I started recieving new files again, it is running five tasks total (4 separation tasks, 2 per GPU), and one nbody task. That doesn't seem right, either.


It seems right to me: what you may not realise is that the server doesn't know you've tweaked the client to only use 2 cores for an Nbody job so it sends it out tagged as using 4 cores. But when your client actually runs an Nbody task with your revised configuration, there are now two cores left over and you're getting 4 Separation GPU jobs in those slots. Unless it suddenly stops leaving 2 cores free for other work, I would assume it's doing what you want...

Cheers - Al.
ID: 70100 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Message boards : Number crunching : nbody: Trying to run on 2 cores, but downloading 4 core tasks

©2024 Astroinformatics Group