[SCore-users-jp] Re: [SCore-users] MPI and PM at the same time
kameyama at pccluster.org
kameyama at pccluster.org
Fri Oct 18 09:44:26 JST 2002
HI.
In article <Pine.LNX.4.44.0210171532270.22679-100000 at kenzo.iwr.uni-heidelberg.de> Bogdan Costescu <bogdan.costescu at iwr.uni-heidelberg.de> wrotes:
> > Define the number of network sets with the RESOURCE MACRO, like this.
> >
> > SCORE_RSRC_NUM_NETS(N)
>
> I've already tried to set directly the score_num_pmnet variable which is
> mentioned in the score_initialize() man page and after MPI_Init(), the
> number of contexts is always 1. When using this macro, the compiler (with
> -Wall) warns that "unused variable `score_resource_num_netsets'" and the
> result is always 1 context.
SCORE_RSRC_NUM_NETS try to *initialize* (not set) global
variable to set number of network sets.
So you must use SCORE_RSRC_NUM_NETS macro out of the function definition.
> #include <stdio.h>
> #include <stdlib.h>
> #include <mpi.h>
> #include <sc.h>
> #include <score.h>
> #include <errno.h>
> #include <string.h>
> #include <score_resource.h>
>
>
> pmContext *mpic, *pc;
> pmDevice *pd;
Please insert
SCORE_RSRC_NUM_NETS(2);
here.
> int main(int argc, char **argv)
> {
> int err, i;
> pmContextConfig cc;
> pmContext *allc[PM_MAX_NODE];
> int allnr[PM_MAX_NODE];
>
> SCORE_RSRC_NUM_NETS(2);
you may remove this SCORE_RSRC_NUM_NETS macro.
from Kameyama Toyohisa
More information about the SCore-users
mailing list