determining the number of cpus available to bionc client & scheduling question

Message boards : API : determining the number of cpus available to bionc client & scheduling question
Message board moderation

To post messages, you must log in.

AuthorMessage
supert8

Send message
Joined: 8 Dec 09
Posts: 5
United States
Message 32973 - Posted: 23 May 2010, 20:19:06 UTC

I was wondering if anyone has an example that shows how to determine the number of CPUs available to the boinc client programatically.

What I would like to do is ultimately be able to tell the number of cores available to a boinc client so that I can run one process with access to all of the available cores. For example if the client is configured to use 4 cores, I would like to run one process that utilizes 4 cores rather than 4 process that each utilize one core.

Thanks for your help!
ID: 32973 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 32975 - Posted: 23 May 2010, 20:35:14 UTC - in response to Message 32973.  

Then make a Multi threading application.

If you do not want to set up a project and have your own applications, but are asking this for the use on already existing projects, then this isn't possible. The application decides how many CPUs it uses, not BOINC.
ID: 32975 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 33289 - Posted: 7 Jun 2010, 0:35:58 UTC - in response to Message 32973.  
Last modified: 7 Jun 2010, 0:43:54 UTC

You can't and shouldn't try to get the host's CPU count from the client. If your app uses four CPU-intensive threads, BOINC would still run three other apps, thinking your app only uses one core.

The decision of how many threads to use should be done in the server, using a plan class. Then the client would receive a workunit description saying it uses 4 CPUs, and schedule it correctly. From your app_plan function in the server, you can also add command line arguments to the workunit, which would tell your application how many threads to use.
ID: 33289 · Report as offensive
supert8

Send message
Joined: 8 Dec 09
Posts: 5
United States
Message 33345 - Posted: 13 Jun 2010, 20:33:18 UTC - in response to Message 33289.  
Last modified: 13 Jun 2010, 20:48:58 UTC

thanks!
ID: 33345 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5077
United Kingdom
Message 33346 - Posted: 13 Jun 2010, 20:49:36 UTC - in response to Message 33345.  

thanks! would either of you happen to have an example for the mt plan class, namely what needs to be done for xadd and update_versions to recognize the mt plan class mentioned on the wiki? an example of the file structure would also help for the apps directory

Thanks a lot

The best idea would be to ask the devs (Neo and Boinc_Admin) at the AQUA project - they've been using it live for about a year now, and have helped to get a lot of the bugs out of the BOINC [mt] system.
ID: 33346 · Report as offensive

Message boards : API : determining the number of cpus available to bionc client & scheduling question

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.