Newsgroups: comp.parallel.pvm
From: pvm@hp720.dibe.unige.it ()
Subject: DIRECT ROUTING HELP! HELP!
Organization: Univ. of Genoa, Italy
Date: 28 Jan 1995 07:39:31 GMT
Message-ID: <3gcsbj$o62@alpha.cisi.unige.it>


Hy, I have a big PVM_problem!
I have build an master-slave alghoritm, based on PVM 3.3.6, and I need
to do message passing from master to slave while master do other operations.
This is a short example of what my program do:


/***** MASTER *****/

void main(void)
	{
	pvm_setopt(PvmRoute, PvmRouteDirect);
	master_spawn_task();
	if(fork()==0)
		{
		send_data_to_slave();
		exit(0);
		}
	master_do_other_work();

	recv_results_from_slave();
	}



/***** SLAVE *****/

void main(void)
	{
	pvm_setopt(PvmRoute, PvmRouteDirect);
	recv_data_from_master();
	slave_do_work();
	send_results_to_master();
	}


The problem is that I want to use PvmRoute=PvmRouteDirect: it
happens that slave receive data correctly but it die when is the
moment to send results to master (PvmAutoError=2 and the program 
fails the same with or without the exit(0) in fork()).
Why? What is the solution?


THANKS TO ANYONE
	Marco

