Newsgroups: comp.parallel.pvm
From: zhou@isis.epm.ornl.gov (Honbo Zhou)
Subject: Re: Is PVM Thread Safe?
Organization: Oak Ridge National Lab, Oak Ridge, TN
Date: 18 Jul 1995 03:33:36 GMT
Message-ID: <3ufa2g$am0@stc06.ctd.ornl.gov>

Tony Skjellum (tony@aurora.cs.msstate.edu) wrote:
: Do either of these solutions conserve legacy codes?  TPVM seems like

In both TPVM and LPVM, API have somewhat been changed. In LPVM, some
additional parameters have to be introduced to make PVM thread safe. 
In TPVM, you have to do explicit export of threads' entry points, etc... 

: it might, because thread-oriented calls have a new call, whereas
: PVM mainline version will have to have a new argument in almost all
: calls [at least those that refer to a message buffer].  Even with
: calls that refer to a message buffer having a message-buffer ID,
: will PVM be thread-safe once the new contexts, static groups,
: and other feature are added, as discussed at the PVM UG meeting?

The bottom line is: calls such as pvm_send()/pvm_recv() in the
current version of PVM is NOT REENTRANT. In LPVM, those calls are
made reentrant and thread/signal safe. In TPVM, those call are not
made reentrant. For example, tpvm_send() in TPVM calls pvm_send() to
do real message passing, since pvm_send() is not reentrant, mutex
lock has been used in TPVM to make sure there is only one "current"
pvm_send() running, so even if you have multipe threads running, 
there can only be one thread doing message passing (this is my 
understanding, correct me if I am wrong) at a given time. 

It would be a nice approach to take advantage of the entry point 
export feature of TPVM and LPVM's effort to make PVM reentrant 
(thread and signal safe).

Cheers,

Honbo Zhou

