Native Multi-Threading

Message boards : Number crunching : Native Multi-Threading
Message board moderation

To post messages, you must log in.

AuthorMessage
Tomáš Brada

Send message
Joined: 15 Dec 19
Posts: 5
Credit: 88,316
RAC: 0
Message 349 - Posted: 16 Dec 2019, 20:57:01 UTC

Hello, I noticed the task is run under mpirun, which means, it could run on multiple threads.
How to configure the task to run on multiple threads?
ID: 349 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
tcauchy

Send message
Joined: 4 Aug 19
Posts: 11
Credit: 74,704,720
RAC: 0
Message 350 - Posted: 16 Dec 2019, 21:21:10 UTC

Dear Tomas,

NWChem that is used here for the calculations of the molecules, profit from multithreading only with bigger molecules.
We have tested 1, 2 and 4 threads and the gain was none!

Kindly,
Thomas, the chemist of the project
ID: 350 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Tomáš Brada

Send message
Joined: 15 Dec 19
Posts: 5
Credit: 88,316
RAC: 0
Message 352 - Posted: 17 Dec 2019, 9:16:48 UTC

Interesting.
See, I am curious so I will probably try it anyway as I have found where to modify it in the script.
ID: 352 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Zalster

Send message
Joined: 16 Dec 19
Posts: 25
Credit: 11,938,843
RAC: 0
Message 355 - Posted: 17 Dec 2019, 14:54:35 UTC - in response to Message 352.  
Last modified: 17 Dec 2019, 15:14:47 UTC

Interesting.
See, I am curious so I will probably try it anyway as I have found where to modify it in the script.


Tomas,

Have you noticed that when the work units start, they are 164% CPU and slowly work their way down to a lower value closer to 50% by the end?

I would interested in your mod if you would be willing to share. I find it interesting that the QC from GPUGrid was running 4 CPU threads per work unit whereas here they are just under 1.5. Please let us know if the mod significantly changes the time to complete.

Z
ID: 355 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
[VENETO] boboviz

Send message
Joined: 13 Sep 19
Posts: 69
Credit: 399,347
RAC: 0
Message 356 - Posted: 17 Dec 2019, 15:59:38 UTC - in response to Message 350.  

NWChem that is used here for the calculations of the molecules, profit from multithreading only with bigger molecules.

I don't know if NWChem supports gpu calculation (CUDA or, better, OpenCL), but this may be a great improvement...
ID: 356 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
damotbe
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist
Help desk expert

Send message
Joined: 23 Jul 19
Posts: 289
Credit: 464,119,561
RAC: 0
Message 358 - Posted: 17 Dec 2019, 17:45:42 UTC - in response to Message 356.  

NWchem support GPU for CCSD(T) but not for our kind of tasks (DFT)
ID: 358 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Aurum
Avatar

Send message
Joined: 14 Dec 19
Posts: 68
Credit: 45,744,261
RAC: 0
Message 359 - Posted: 17 Dec 2019, 22:01:38 UTC
Last modified: 17 Dec 2019, 22:04:38 UTC

Create an app_config.xml file for QCP:
<app_config>
<app>
    <name>nwchem</name>
</app>
<app_version>
    <app_name>nwchem</app_name>
    <plan_class>t1</plan_class>
    <avg_ncpus>2</avg_ncpus>
    <cmdline>--nthreads 2</cmdline>
</app_version>
</app_config>
Have BOINC read config files and then restart BOINC:
/etc/init.d/boinc-client restart
Works for me but I predict a single CPU thread is best. I believe these multithreaded WUs can end up with all threads but one done and they wait. With the large variability of QCP WUs this may idle too many CPUs.
ID: 359 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Zalster

Send message
Joined: 16 Dec 19
Posts: 25
Credit: 11,938,843
RAC: 0
Message 360 - Posted: 18 Dec 2019, 0:50:22 UTC - in response to Message 359.  

Thanks Aurum,

I was going to play around with the app_config when I came home from work but you saved me that trouble. Thanks!

I'll give it a try here in a bit.

Z
ID: 360 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Zalster

Send message
Joined: 16 Dec 19
Posts: 25
Credit: 11,938,843
RAC: 0
Message 361 - Posted: 18 Dec 2019, 15:11:43 UTC - in response to Message 359.  

Works for me but I predict a single CPU thread is best. I believe these multithreaded WUs can end up with all threads but one done and they wait. With the large variability of QCP WUs this may idle too many CPUs.


So I got the chance to watch these work units with varying values for number of threads. First thing I noticed was with no app_config, that the number of threads used at startup for 1 work unit is all threads. It then rapidly reduces itself down to around 300% (or 3 threads) and slowly draws down to under 1 thread until the last 10 minutes. At that point there is a rapid drop off on the CPU usage, down to around 30% (cause a red flag for amount of CPU as set by the app) then finishing up of the work unit. I'm assuming that the last 10 minutes it's wrapping up whatever it is doing and doesn't really need much CPU at that point.

With an app_config and 4 threads per work unit, I saw that each work unit was holding at 99.6% but again followed the last 10 minute drop as above. With fewer threads per work unit the value was anywhere from 70-96% CPU usage during the majority of time but again dropped off at the end. I finally settled on 2 threads for no other reason than it keeped the number of work units on my CPU to a number I wanted. I saw no change in the time to completion with varying number of threads. Review of all work units showed total percentage of cpu usage was around 96% (I'm assuming this is an average value) for all work units with varying threads.

So the only reason to keep the app_config for me is to limit total number of work units on my machine at any time and to keep any work unit from claiming all threads when it first starts up. Using the number of thread option in the app_config seems to reign in that free for all and keeps the app to a reasonable amount of threads until it can correct itself.
ID: 361 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
mmonnin

Send message
Joined: 8 Oct 19
Posts: 13
Credit: 2,548,714
RAC: 0
Message 364 - Posted: 19 Dec 2019, 0:36:49 UTC - in response to Message 356.  

NWChem that is used here for the calculations of the molecules, profit from multithreading only with bigger molecules.

I don't know if NWChem supports gpu calculation (CUDA or, better, OpenCL), but this may be a great improvement...


Just ignore this user. They make the same comment at every BOINC project like GPUs are some voodoo magic.
ID: 364 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Hal Bregg

Send message
Joined: 4 Oct 19
Posts: 4
Credit: 36,086
RAC: 0
Message 380 - Posted: 4 Jan 2020, 15:54:49 UTC - in response to Message 364.  
Last modified: 4 Jan 2020, 16:14:58 UTC

NWChem that is used here for the calculations of the molecules, profit from multithreading only with bigger molecules.

I don't know if NWChem supports gpu calculation (CUDA or, better, OpenCL), but this may be a great improvement...


Just ignore this user. They make the same comment at every BOINC project like GPUs are some voodoo magic.


What's wrong with with GPU crunching?
ID: 380 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
[VENETO] boboviz

Send message
Joined: 13 Sep 19
Posts: 69
Credit: 399,347
RAC: 0
Message 382 - Posted: 4 Jan 2020, 20:18:57 UTC - in response to Message 364.  

Just ignore this user. They make the same comment at every BOINC project like GPUs are some voodoo magic.

There is something bad to trying to accelerate science?
ID: 382 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
[VENETO] boboviz

Send message
Joined: 13 Sep 19
Posts: 69
Credit: 399,347
RAC: 0
Message 383 - Posted: 4 Jan 2020, 20:22:16 UTC - in response to Message 364.  

Just ignore this user. They make the same comment at every BOINC project like GPUs are some voodoo magic.

I'm a long time boinc user (and team admin)
I know that gpus are not the solution for everything.
But also know that, when projects can use gpu, they have GREAT benefit.
ID: 383 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Message boards : Number crunching : Native Multi-Threading

©2024 Benoit DA MOTA - LERIA, University of Angers, France