=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/sm1pvm.c,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -u -p -r1.1.1.1 -r1.4 --- OpenXM/src/kan96xx/plugin/sm1pvm.c 1999/10/08 02:12:05 1.1.1.1 +++ OpenXM/src/kan96xx/plugin/sm1pvm.c 2003/08/22 16:08:22 1.4 @@ -1,3 +1,4 @@ +/* $OpenXM: OpenXM/src/kan96xx/plugin/sm1pvm.c,v 1.3 2001/05/04 01:06:30 takayama Exp $ */ #include #include "pvm3.h" #define SLAVENAME "slave3" @@ -29,29 +30,29 @@ static struct pvmhostinfo *Hostp[MAXHOSTS+1]; KpvmStartSlaves(char *name,int nproc) { int numt,i,info; - /* enroll in pvm */ - Nproc = nproc; - Mytid = pvm_mytid(); - if (Nproc > MAXHOSTS) { - Nproc = MAXHOSTS-1; - fprintf(stderr,"Too many tasks. It is set to %d\n",Nproc); + /* enroll in pvm */ + Nproc = nproc; + Mytid = pvm_mytid(); + if (Nproc > MAXHOSTS) { + Nproc = MAXHOSTS-1; + fprintf(stderr,"Too many tasks. It is set to %d\n",Nproc); + } + /* start up slave tasks */ + numt=pvm_spawn(name, (char**)0, 0, "", Nproc, Tids); + if( numt < Nproc ){ + fprintf(stderr,"Trouble spawning slaves. Aborting. Error codes are:\n"); + for( i=numt ; i> of the type 10.\n",darray[remaining]); + printf("Sending the message <<%s>> of the type 10.\n",darray[remaining]); pvm_send(rtid, 10); } @@ -184,7 +185,7 @@ main() m = 5; - if (KpvmStartSlaves(SLAVENAME,3)) exit(); + if (KpvmStartSlaves(SLAVENAME,3)) exit(0); KpvmMcast("/afo { /n set (x+1). n power [((x-1)^2).] reduction 0 get (string) dc} def "); obj = newObjectArray(m);