ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc program worker ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c This is the worker program corresponding to the manager program: c c manager.f c c It receives an integer message from the manager, prints it, c modifies it by adding 100, and then sends the results back c to the manager. ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc implicit none c c Note: full path is given in INCL compilation flag in makefile: c include 'fpvm3.h' integer nodeid, hostid, bufid, hostnm_ character*7 my_hostname, manager_name c integer rc, i c c Enroll this program in PVM and return an id for this process... c call pvmfmytid(nodeid) c c Get worker hostname: c rc = hostnm_(my_hostname) c c Determine manager's id so that this worker can direct messages there... c call pvmfparent(hostid) c c Receive a broadcast containing the manager's hostname: c call pvmfrecv(hostid, 100, bufid) call pvmfunpack(STRING, manager_name, 7, 1, rc) c c Receive (and unpack) the start-up information from the manager... c call pvmfrecv(hostid, 200, bufid) call pvmfunpack(INTEGER4, i, 1, 1, rc) write(6,100) nodeid, my_hostname, i, manager_name 100 format('Stdout from node ',I9,' (',A,'): Received ',I3, * ' from host ', A ,'.') c Now, perform a trivial computation on the integer value: i = i+100 c c Send the computed information back to the manager. c call pvmfinitsend(0, bufid) call pvmfpack(INTEGER4, nodeid, 1, 1, rc) call pvmfpack(INTEGER4, i, 1, 1, rc) call pvmfsend(hostid, 300, rc) c c Call pvmfexit to terminate the PVM program gracefully... c call pvmfexit(rc) stop end