OK - please try the other way:

     #include <unistd.h>
     #include <linux/sysctl.h>

     int mib[2], p_ncpus;
     size_t len;
     mib[0] = CTL_HW;
     mib[1] = HW_NCPU;
     len = sizeof(p_ncpus);
     sysctl(mib, 2, &p_ncpus, &len, NULL, 0);
     printf("%d\n", p_ncpus);

On 21-Dec-2012 1:33 PM, Jonathan Hoser wrote:
> Hi David,
>
> thanks for the quick feedback:
> It looks as if I might have hit an issue:
>
>
> [root@hosta ~]# cat small.c
> #include <stdio.h>
> #include <unistd.h>
> int main() {
>       printf("NProc_ONLN: %d\n", sysconf(_SC_NPROCESSORS_ONLN));
>       printf("NProc_CONF: %d\n", sysconf(_SC_NPROCESSORS_CONF));
>
> }
> [root@host~]# gcc small.c -o smallcpus
> [root@host ~]# ./smallcpus
> NProc_ONLN: 128
> NProc_CONF: 128
>
>
> I will continue to look into the issue, maybe I can unearth something.
>
> Best
> -Jonathan
>
> On 12/21/2012 08:53 PM, David Anderson wrote:
>> Jonathan:
>> BOINC doesn't limit the # of CPUs as far as I know.
>> On Linux, the client gets the # of CPUs using:
>>
>> p_ncpus = sysconf(_SC_NPROCESSORS_ONLN);
>>
>> Can you see what this returns on your system?
>> i.e. run a program of the form
>>
>> #include <stdio.h>
>> #include <unistd.h>
>> int main() {
>>       printf("%d\n", sysconf(_SC_NPROCESSORS_ONLN));
>> }
>>
>> If it shows 128, try replacing _SC_NPROCESSORS_ONLN with _SC_NPROCESSORS_CONF
>> and see what it says.
>>
>> -- David
>>
>> On 21-Dec-2012 4:38 AM, Jonathan Hoser wrote:
>>> Hi all,
>>>
>>> 7.0.29 (r25790svn) which is packaged with Fedora17 is limited to 128 CPUs
>>>
>>> I'm not sure if this is server or client bound,
>>> but why the limit?
>>> I can't use boinc as a test-tool for new servers if it doesn't max them out!
>>>
>>> Best
>>> -Jonathan
>>> _______________________________________________
>>> boinc_dev mailing list
>>> [email protected]
>>> http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
>>> To unsubscribe, visit the above URL and
>>> (near bottom of page) enter your email address.
>>>
>> _______________________________________________
>> boinc_dev mailing list
>> [email protected]
>> http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
>> To unsubscribe, visit the above URL and
>> (near bottom of page) enter your email address.
>>
>
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to