Newsgroups: comp.parallel.pvm
From: rblock@ncsa.uiuc.edu (Robert J. Block)
Subject: pvm_insert and pvm_locate
Organization: Nat'l Ctr for Supercomp App (NCSA) @ University of Illinois
Date: 3 May 1995 18:25:22 GMT
Message-ID: <3o8hqi$8st@vixen.cso.uiuc.edu>

Hi, all.

I'm having a problem using the functions pvm_insert and pvm_locate
in a very simple pair of programs I wrote that are trying to act
like a client and server. 

The server does:

	server_tid = pvm_mytid();
  	pvm_insert("theserver", 0, server_tid);
	printf("server running, task id = %d\n", server_tid);

	... waits for clients to call ...


The client does:

	int mytid = pvm_mytid();
	ret = pvm_lookup("theserver", 0, &server_tid);

	... queries server for various stuff ...

The problem is, the client doesn't receive the correct tid from
lookup.  It always gets the tid of the FIRST task that was started
under the current pvm session, which is 262146 (hex 40002).
So if I just initiated the pvm session and fire off the server,
the client gets the correct tid, but any time afterwards it gets
the wrong one.

I also tried changing the second parameter from 0 to -1 in both
function calls, but with no difference.

Can someone who knows how these functions work please help me out?

Thanks,
Rob Block (rblock@ncsa.uiuc.edu)
 


