[SCore-users-jp] Re: [SCore-users] MPI and PM at the same time

kameyama @ pccluster.org kameyama @ pccluster.org
2002年 10月 18日 (金) 09:44:26 JST


HI.

In article <Pine.LNX.4.44.0210171532270.22679-100000 @ kenzo.iwr.uni-heidelberg.de> Bogdan Costescu <bogdan.costescu @ 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
_______________________________________________
SCore-users mailing list
SCore-users @ pccluster.org
http://www.pccluster.org/mailman/listinfo/score-users



SCore-users-jp メーリングリストの案内