C****************************************************************************** C PVM TEMPLATE CODES C FILE: hello.master.f C OTHER FILES: hello.worker.f make.hello.f C DESCRIPTION: Trivial PVM example - master program. Fortran version C PVM VERSION: 2.4.2 C AUTHOR: Blaise Barney C LAST REVISED: 6/27/93 bbarney for 2.4.2 C****************************************************************************** program hello_master parameter(NUM_INSTANCES = 6) parameter(HELLO_MSGTYPE = 1) integer i, msgtype, info, inst(NUM_INSTANCES) character*12 helloworld/'HELLO WORLD!'/ print *, 'Enrolling master component in pvm...' call fenroll( "hello.master\0",info) print *,'Initiating worker component instances...' do 10 i=1,NUM_INSTANCES call finitiate( "hello.worker\0", "RIOS", inst(i) ) print *,' initiated instance= ',inst(i) 10 continue print *,'Sending message to all worker instances' msgtype = HELLO_MSGTYPE call finitsend() call fputstring(helloworld,info) do 20 i=1, NUM_INSTANCES call fsnd( "hello.worker\0", inst(i), msgtype, info ) 20 continue print *, 'All done. Leaving hello.master' call fleave() end