/* master program for the simple communication program */ /* which starts slaves just to get their names and the */ /* local time back */ #include #include main() { struct pvmhostinfo *hostp; int result, check, i, nhost, narch, stid; char buf[64]; pvm_setopt(PvmRoute, PvmRouteDirect); /* channel for communication */ gethostname(buf, 20); /* get name of master */ printf("The master process runs on %s \n", buf); /* get and display configuration of the parallel machine */ pvm_config( &nhost, &narch, &hostp ); /* get configuration */ printf("I found the following hosts in your virtual machine\n"); for (i = 0; i < nhost; i++) { printf("\t%s\n", hostp[i].hi_name); } for (i=0; i