Newsgroups: comp.parallel.pvm
From: "Carlos Manuel Cambetas Martins Vaz" <cmvaz@student.dei.uc.pt>
Subject: Re: Problem win PVM for WIN32
Date: 13 Dec 1996 15:10:09 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Message-ID: <01bbe8ff$7861cb00$c1c1c1c1@host.telepac.pt>


Bernd Helzer <bhelzer@folio.com> wrote in article =
<01bbe8b0$6a804560$0d00010a@bhelzer-home>...
> I just installed PVM for win32, mostly to debug some programs. The =
test
> programs all work fine but my own program has some problem:
>=20
> 1.
> int main(int argc,char * argv[])
> {
> 	g_nParent =3D pvm_parent();
>=20
> this fails, but
>=20
> int main(int argc,char * argv[])
> {
> 	pvm_mytid();
> 	g_nParent =3D pvm_parent();
>=20
> this works.

You are using this code in your application or in your spawn process ?

I use the following code in my spawn process and works fine.

int PASCAL FAR pvm_main (int /*argc*/, char ** /*argv*/){
  int tid_parent=3Dpvm_parent();
  if (tid_parent=3D=3DPvmNoParent) {
	 printf("Error=85..");
	 return (0);
  }
  if (tid_parent<0) exit (0);


> More seriously is that
> 2.
> pvm_spawn(g_szName,NULL,PvmTaskHost,szComputerName,1, =
nProcessID[nLoop]);
>=20
> crashes PVM (it just quits and so does my application.
> g_szName is the name of the calling program (I am trying to run a =
second
> copy of the program), and the computername is this computer.

I had some problems too.
Be careful with the types of data required in the PVM primitive.=20
For example, I use :=20

  int i, tid, info;
  char * machine=3D"student.dei.uc.pt";
  char * process_name=3D"slave.exe";
  int info;
  info=3Dpvm_spawn(process_name,(char **)0,PvmTaskHost,
		machine,1,&tid);


Bye


________________________________________________________
Carlos Manuel C. M. Vaz            Universidade de Coimbra
cmvaz@student.dei.uc.pt            Dep. Eng. Inform=E1tica
http://student.dei.uc.pt/~cmvaz   +351 (0)39 7000058
PGP @ finger
________________________________________________________

