Newsgroups: comp.parallel.pvm
From: bassett@ecn.purdue.edu (Matthew H. Bassett)
Subject: Spawning with arguments
Organization: Purdue University Engineering Computer Network
Date: 29 Feb 1996 15:29:35 GMT
Message-ID: <4h4gov$k8h@mozo.cc.purdue.edu>

I am trying to spawn executables which take a number of command line arguments. 
According to the ref manual I can pass these areguments in the argv parameter of
pvm_spawn.  But in the spawned jobs, these arguments are overwritten...for
example for executable "run":

main(argc, argv) {

 pvm_spawn("run", argv, NULL, NULL, 1, NULL);

 for (i = 0; i < argc; i++) {
  cout << argv[i] << " ";	
 }
 cout << endl;

}

if I say run 1 2 3, the first copy prints "run 1 2 3" but the second copy only
print "run" and that is all.

Any ideas of what is going on?

--
Matt Bassett
Dept. of ChE, Purdue University
West Lafayette, IN  47906
bassett@ecn.purdue.edu
http://atsp.ecn.purdue.edu:8080/bassett/

