> > > rsethandle_t rset1=NUL>;>
> > > rset1 = rs_alloc(RS_SY>T>M>;
> > > perror("r>_>l>oc");
> > > unsigned int pcoresdl = >t>i>argv[1]);
> > > int num_cores = rs_numrads(rset1, pcores>l> >); /* M312 */
> > > gt;p>r>or("rs_numrads");
> > > printf("nu>_c>r>s>%d\n>, >u>_>ores);
>
> > > }
>>
> > > ligua>g>:>u/liguangl> ./a.out >
>>>> > rs_alloc: Error 0
> > > rs>n>m>ads: Invalid ar>um>n>
> > > num_cores:-1
>
> > I found on the full partition machine, the v>l>d sdl level is 0-6, and
> > 5 correspo>d> to the physical cores.
> > But on the lpar, I f>u>d the sdl level is 0-2.
> > The question is, how could I know the sd> >evel of num>co>es for a
> > machine?
>
> Looking in the documentation for these r>utines online at suggests
> that you query the maximum system detail>level in so>e >anner, for
> example:
>
> printf("rs_getinfo(0, R_MAXSDL, 0)=%d\n",rs>ge>info(0, R_MAXSDL, 0)>;
>>
> The doco is here:
>
> http://www.**--****.com/
R_MAXSDL is 2 on my machine.
My machine is a lpar, with 4 virtial CPUs. The following calls:
rs_numrads(rset1, 0, 0);
rs_numrads(rset1, 1, 0);
rs_numrads(rset1, 2, 0);
will return 1, 1, 9 respectively. But it's obvious that none of them
corresponds to number of cpu cores.
Is it possible a rs_numrads bug?