Newsgroups: comp.parallel.pvm
From: ambati@apollo.HP.COM (Ashok Ambati)
Subject: Re: Help on pvm_spawn()
Organization: Hewlett-Packard Company, Chelmsford, MA
Date: Fri, 17 Mar 1995 22:50:30 GMT

In article <3ka1m1$hk@upsun21.up.edu>, sarwar@up.edu (Mansoor Sarwar) writes:
|> Hi 
|> 
|> I am a rookie in the PVM world and am trying to get the following 
|> program to run.  I think, I've followed everything according to the book, 
|> but when I run the program the following appears on the screen.  I have 
|> tried specifying full pathname for hello_2, which is in ~/pvm3/bin/ARCH 
|> (it's rightful place according to the pvm-book and a short tutorial that 
|> I grabbed off the net).  Any help will be appreciated.
|> 
|> BTW, I have tried some other pieces of codes that do not use pvm_spawn() 
|> and they work fine.  So, obviously, the problem is with pvm_spawn(), which 
|> cannot seem to find the executable.
|> 
|> Mansoor
|> 
|> ----- Error Message ------------
|> 10% hello
|> i'm t40004
|> cc = 0
|> SPAWN Error: No such file or directory
|> can't start hello_2
|> 
|> -------------------- Source Code ------------------
|> #include <stdio.h>
|> #include "pvm3.h"
|> 
|> main()
|> {
|>         int cc, tid;
|>         char buf[100];
|> 
|>         printf("i'm t%x\n", pvm_mytid());
|> 
|>         cc = pvm_spawn("hello_2", NULL, "upsun21.up.edu", "SUN4", 1, &tid);
|> 
|>         if (cc == 1) {
|>                 cc = pvm_recv(-1, -1);
|>                 pvm_bufinfo(cc, (int*)0, (int*)0, &tid);
|>                 pvm_upkstr(buf);
|>                 printf("from t%x: %s\n", tid, buf);
|> 
|>         }
|>         else {
|>                 printf("cc = %d\n", cc);
|>                 perror("SPAWN Error");
|>                 printf("can't start hello_2\n");
|>         }
|> 
|>         pvm_exit();
|> }
|> -- 
|> -----------------------------------------------------
|> 
Check the arguments to pvm_spawn. The third argument should be an integer that
specifies how the following (string) argument should be interpreted with
regard to the placement of the created process.

Hope this helps.

Ashok Ambati.

