Advanced search

Message boards : Number crunching : ncpus at cc_config.xml

Author Message
Profile Damaraland
Send message
Joined: 7 Nov 09
Posts: 152
Credit: 16,181,924
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 23563 - Posted: 20 Feb 2012 | 9:16:53 UTC

This is very basic, for advanced users, but... it took me a while. So I explain it just in case somebody has the same problem as I. There's plenty of explanations everywhere, but I'm going to make it simple.

My computer (8 core Intel) was running really slow with GPU, I have other proyects running at the same time:
44,233.67 secs ACEMD2: GPU molecular dynamics v6.14 (cuda31)
100,153.34 secs ACEMD2: GPU molecular dynamics v6.15 (cuda31)

After googling everywhere, I understood that CPU was saturated, so I limited it to 7 cores (N-1):

cc_config.xml
<cc_config>
<options>
<ncpus>7</ncpus>
</options>
</cc_config>

<ncpus>N</ncpus>
Act as if there were N CPUs; i.e. to simulate 2 CPUs on a machine that has only 1. To use the number of available CPUs, set the value to -1 (was 0 which in newer clients really means zero to e.g. only allow GPU computing).

With this I got 11% of improvement on the non GPU tasks (due to CPU saturation of running 8+2 tasks simustaneosly). 7/8 cores makes -12%, but GPUs are now running a lot faster. So I got better performance in the whole system.
26,393.04 secs ACEMD2: GPU molecular dynamics v6.14 (cuda31)

Profile MarkJ
Volunteer moderator
Project tester
Volunteer tester
Send message
Joined: 24 Dec 08
Posts: 721
Credit: 149,720,182
RAC: 331
Level
Cys
Scientific publications
watwatwatwatwatwatwatwatwatwatwatwatwat
Message 23565 - Posted: 20 Feb 2012 | 9:44:02 UTC - in response to Message 23563.

This is very basic, for advanced users, but... it took me a while. So I explain it just in case somebody has the same problem as I. There's plenty of explanations everywhere, but I'm going to make it simple.

My computer (8 core Intel) was running really slow with GPU, I have other proyects running at the same time:
44,233.67 secs ACEMD2: GPU molecular dynamics v6.14 (cuda31)
100,153.34 secs ACEMD2: GPU molecular dynamics v6.15 (cuda31)

After googling everywhere, I understood that CPU was saturated, so I limited it to 7 cores (N-1):

cc_config.xml
<cc_config>
<options>
<ncpus>7</ncpus>
</options>
</cc_config>

<ncpus>N</ncpus>
Act as if there were N CPUs; i.e. to simulate 2 CPUs on a machine that has only 1. To use the number of available CPUs, set the value to -1 (was 0 which in newer clients really means zero to e.g. only allow GPU computing).

With this I got 11% of improvement on the non GPU tasks (due to CPU saturation of running 8+2 tasks simustaneosly). 7/8 cores makes -12%, but GPUs are now running a lot faster. So I got better performance in the whole system.
26,393.04 secs ACEMD2: GPU molecular dynamics v6.14 (cuda31)


<ncpus> is not recommended. The suggested approach is to specify the % of processors to use in your preferences which achieves the same thing. When crunching GPUgrid work I set it to 87.5% which frees up a CPU core (on my 8 core machines). Much simpler and easier to change as needed than a cc_config file entry.
____________
BOINC blog

Profile Damaraland
Send message
Joined: 7 Nov 09
Posts: 152
Credit: 16,181,924
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 23573 - Posted: 20 Feb 2012 | 20:16:17 UTC - in response to Message 23565.

<ncpus> is not recommended. The suggested approach is to specify the % of processors to use in your preferences which achieves the same thing. When crunching GPUgrid work I set it to 87.5% which frees up a CPU core (on my 8 core machines). Much simpler and easier to change as needed than a cc_config file entry.

Why? It should slow down all my task 87%, so I don't see it. I will test it.

Björn
Send message
Joined: 3 Jan 09
Posts: 2
Credit: 3,833,800
RAC: 0
Level
Ala
Scientific publications
watwatwatwatwatwatwat
Message 23898 - Posted: 11 Mar 2012 | 17:25:57 UTC

I run Boinc 6.12.34 on my home machine. Next to GPUGrid, I run WCG, because it seems pointless to waste cyclse on finding primes and hash and what not, but that is not the reason for this reply.

I have a Phenom II X4 (965 BE) with 4 cores and dedicate all CPU cycles to WCG and almost all GPU to GPUGrid. Since the recent discussion with the new WU's being dished out and keeping one CPU for that matter free, I would like to reduce the WCG use from 4 to 3 CPU's. I changed that in the WCG preferences for the home PC profile (use only 75%) but it still grabs all 4 cores.

What am I doing wrong?

I also tried to change it in the BOINC manager directly. That seemed to work. How can I tell that the free CPU is used to support the GPU now? Opening the task manager shows three cores at ~75%, one at ~50%.

Profile Damaraland
Send message
Joined: 7 Nov 09
Posts: 152
Credit: 16,181,924
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 23899 - Posted: 11 Mar 2012 | 17:52:14 UTC - in response to Message 23898.

I have a Phenom II X4 (965 BE) with 4 cores and dedicate all CPU cycles to WCG and almost all GPU to GPUGrid. Since the recent discussion with the new WU's being dished out and keeping one CPU for that matter free, I would like to reduce the WCG use from 4 to 3 CPU's. I changed that in the WCG preferences for the home PC profile (use only 75%) but it still grabs all 4 cores.

What am I doing wrong?

I also tried to change it in the BOINC manager directly. That seemed to work. How can I tell that the free CPU is used to support the GPU now? Opening the task manager shows three cores at ~75%, one at ~50%.

Lest's say you have one GPU:
If you don't free your cores you will see 5 tasks = 4 task + 1 task for your GPU.
If you free one core you will see 4 task = 3 task + 1 task for your GPU.

Lest's say you have two GPUs:
If you don't free your cores you will see 6 tasks = 4 task + 2 task for your GPUs.
If you free one core you will see 5 task = 3 task + 2 task for your GPU.
If you free two cores you will see 4 task = 2 task + 2 task for your GPU.

When you change %CPU cores think that GPU usually takes 0,2-0,4 CPU but the CPU is not been use will make the CPUs task run faster.



____________
HOW TO - Full installation Ubuntu 11.10

Barraud Denis
Avatar
Send message
Joined: 2 Sep 08
Posts: 15
Credit: 36,207,656
RAC: 0
Level
Val
Scientific publications
watwatwatwatwatwatwatwatwatwatwatwat
Message 23905 - Posted: 11 Mar 2012 | 21:43:53 UTC

i have win7 on i7-950 , 12 Gb.
my boinc is on a secondary disk.

Try this :

boinc 7.0.20
latest nvidia certified drivers full reloaded with opencl 1.1

- my cc_config :

<cc_config>
<options>
<ncpus>-1</ncpus>
<report_results_immediately>1</report_results_immediately>
<use_all_gpus>1</use_all_gpus>
<save_stats_days>672</save_stats_days>
</options>
</cc_config>

- before stoping boinc, see in event report of boinc :
the free memory of your card and convert the x Mo in octet

i fixe <gpu_ram> for me to 603979776.0000 = 576 Mo << i have a 560 TI 560 : a litle more half , for one single wu.

- and add a new variable before relauching the boinc manager
SWAN_SYNC=0

- use nvida performance the increase the % fan to max (noisy) to cool the gpu
for my GPU 80% used -> %70 FAN at factory parameter : GPU is at 57° C

notice these are to be adapted for the possible number of wu :
<avg_ncpus>0.99</avg_ncpus>
<max_ncpus>0.99</max_ncpus>
<count>1</count>
for 1 single wu.
0.5 for 2 wu
0.33 for 3 wu
0.25 for 4 wu
depending of the gpu and gpu_ram needed for one task.

- my app_info.xml =

<app_info>

<app>
<name>acemdlong</name>
<user_friendly_name>Long runs (8-12 hours on fastest card)</user_friendly_name>
<non_cpu_intensive>0</non_cpu_intensive>
<download_url>http://www.ps3grid.net/PS3GRID/download/acemdlong_6.15_windows_intelx86__cuda31</download_url>
</app>

<file_info>
<name>acemdlong_6.15_windows_intelx86__cuda31</name>
<executable/>
</file_info>

<file_info>
<name>cudart32_31_9.dll</name>
<executable/>
</file_info>
<file_info>
<name>cufft32_31_9.dll</name>
<executable/>
</file_info>
<file_info>
<name>tcl85.dll</name>
<executable/>
</file_info>

<app_version>
<app_name>acemdlong</app_name>
<version_num>615</version_num>
<platform>windows_intelx86</platform>
<avg_ncpus>0.99</avg_ncpus>
<max_ncpus>0.99</max_ncpus>
<flops>197218977547.224270</flops>
<plan_class>cuda31</plan_class>
<api_version>7.0.20</api_version>
<coproc>
<type>CUDA</type>
<count>1</count>
</coproc>
<gpu_ram>805306368.000000</gpu_ram>
<file_ref>
<file_name>acemdlong_6.15_windows_intelx86__cuda31</file_name>
<main_program/>
</file_ref>
<file_ref>
<file_name>cudart32_31_9.dll</file_name>
<open_name>cudart32_31_9.dll</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>cufft32_31_9.dll</file_name>
<open_name>cufft32_31_9.dll</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>tcl85.dll</file_name>
<open_name>tcl85.dll</open_name>
<copy_file/>
</file_ref>
</app_version>


<app>
<name>acemdlong</name>
<user_friendly_name>Long runs (8-12 hours on fastest card)</user_friendly_name>
<non_cpu_intensive>0</non_cpu_intensive>
<download_url>http://www.ps3grid.net/PS3GRID/download/acemdlong_6.16_windows_intelx86__cuda31</download_url>
</app>

<file_info>
<name>acemdlong_6.16_windows_intelx86__cuda31</name>
<executable/>
</file_info>

<file_info>
<name>cudart32_31_9.dll</name>
<executable/>
</file_info>
<file_info>
<name>cufft32_31_9.dll</name>
<executable/>
</file_info>
<file_info>
<name>tcl85.dll</name>
<executable/>
</file_info>

<app_version>
<app_name>acemdlong</app_name>
<version_num>616</version_num>
<platform>windows_intelx86</platform>
<avg_ncpus>0.99</avg_ncpus>
<max_ncpus>0.99</max_ncpus>
<flops>197218977547.224270</flops>
<plan_class>cuda31</plan_class>
<api_version>7.0.20</api_version>
<coproc>
<type>CUDA</type>
<count>1</count>
</coproc>
<gpu_ram>805306368.000000</gpu_ram>
<file_ref>
<file_name>acemdlong_6.16_windows_intelx86__cuda31</file_name>
<main_program/>
</file_ref>
<file_ref>
<file_name>cudart32_31_9.dll</file_name>
<open_name>cudart32_31_9.dll</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>cufft32_31_9.dll</file_name>
<open_name>cufft32_31_9.dll</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>tcl85.dll</file_name>
<open_name>tcl85.dll</open_name>
<copy_file/>
</file_ref>
</app_version>


<app>
<name>acemd2</name>
<user_friendly_name>ACEMD2: GPU molecular dynamics</user_friendly_name>
<non_cpu_intensive>0</non_cpu_intensive>
<download_url>http://www.ps3grid.net/PS3GRID/download/acemd2_6.16_windows_intelx86__cuda31</download_url>
</app>

<file_info>
<name>acemd2_6.16_windows_intelx86__cuda31</name>
<executable/>
</file_info>

<app_version>
<app_name>acemd2</app_name>
<version_num>616</version_num>
<platform>windows_intelx86</platform>
<avg_ncpus>0.99</avg_ncpus>
<max_ncpus>0.99</max_ncpus>
<flops>60076679705.760513</flops>
<plan_class>cuda31</plan_class>
<api_version>7.0.20</api_version>
<coproc>
<type>CUDA</type>
<count>1</count>
</coproc>
<gpu_ram>603979776.000000</gpu_ram>
<file_ref>
<file_name>acemd2_6.16_windows_intelx86__cuda31</file_name>
<main_program/>
</file_ref>
<file_ref>
<file_name>tcl85.dll</file_name>
<open_name>tcl85.dll</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>cudart32_31_9.dll</file_name>
<open_name>cudart32_31_9.dll</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>cufft32_31_9.dll</file_name>
<open_name>cufft32_31_9.dll</open_name>
<copy_file/>
</file_ref>
</app_version>

</app_info>


- VErify préferences parameters.
100% CPU
100% of time of CPU,
-> min and max bufer : must be adapted to time of a wu, to avoid to be out of date.

A+
____________

Björn
Send message
Joined: 3 Jan 09
Posts: 2
Credit: 3,833,800
RAC: 0
Level
Ala
Scientific publications
watwatwatwatwatwatwat
Message 23907 - Posted: 11 Mar 2012 | 21:54:03 UTC - in response to Message 23899.


Lest's say you have one GPU:
If you don't free your cores you will see 5 tasks = 4 task + 1 task for your GPU.
If you free one core you will see 4 task = 3 task + 1 task for your GPU.

Lest's say you have two GPUs:
If you don't free your cores you will see 6 tasks = 4 task + 2 task for your GPUs.
If you free one core you will see 5 task = 3 task + 2 task for your GPU.
If you free two cores you will see 4 task = 2 task + 2 task for your GPU.

When you change %CPU cores think that GPU usually takes 0,2-0,4 CPU but the CPU is not been use will make the CPUs task run faster.




Of course it makes complete sense what you wrote. I have 4 tasks running at the moment, one being a GPU task.

After letting it run for a couple of hours, I see a ~15% speed increase in the WCG WU's. The GPUGrid WU will probably come out at 15 hours, which is in line with previous NATHAN_CB1 WU's.

Profile Damaraland
Send message
Joined: 7 Nov 09
Posts: 152
Credit: 16,181,924
RAC: 0
Level
Pro
Scientific publications
watwatwatwatwat
Message 24012 - Posted: 17 Mar 2012 | 20:58:38 UTC - in response to Message 23573.

<ncpus> is not recommended. The suggested approach is to specify the % of processors to use in your preferences which achieves the same thing. When crunching GPUgrid work I set it to 87.5% which frees up a CPU core (on my 8 core machines). Much simpler and easier to change as needed than a cc_config file entry.

Why? It should slow down all my task 87%, so I don't see it. I will test it.

Finally I tried both things and have the same efect. It`s simpler do it in preferences, but you have to make a profile for each computer. Finally I'm even on this.

I just want to enfore anyone who runs CPU and GPU not to put un 100%, you are losing a lot of performance in both GPU and CPU projects. I read some threads of people thinking this 'stops' cores.
____________
HOW TO - Full installation Ubuntu 11.10

Post to thread

Message boards : Number crunching : ncpus at cc_config.xml