Newsgroups: comp.parallel.pvm
Path: ukc!uknet!nessie!doc.ic.ac.uk!warwick!zaphod.crihan.fr!univ-lyon1.fr!ghost.dsi.unimi.it!batcomputer!caen!spool.mu.edu!howland.reston.ans.net!cs.utexas.edu!hermes.chpc.utexas.edu!pefv700
From: pefv700@chpc.utexas.edu (Christopher Phillips)
Subject: Re: Error on pvm_parent
Message-ID: <1994Jan13.184714.29488@chpc.utexas.edu>
Organization: The University of Texas System - CHPC
References: <CJIx9s.CD6@cpccspc.cphk.hk>
Date: Thu, 13 Jan 94 18:47:14 GMT
Lines: 37

In article <CJIx9s.CD6@cpccspc.cphk.hk> cs056888@csun22 (Wong Chun (BACS4 Class A)) writes:
>I have problems with PVM!! I have written two simple but it just fails.
>
>Program 1 : test.c
>#include <stdlib.h>
>#include <stdio.h>
>#include <pvm3.h>
>#define SLAVENAME "tests"
>main()
>{
>    int mytid;
>    int tids[32];
>    int n, nproc, i;
>
>    mytid = pvm_mytid();
>
>    nproc = 1;
>
>    pvm_spawn(SLAVENAME, (char**)0, 12, "", nproc, tids);
>
>    for (i=0;i<nproc;++i)
>        printf("\nThe tids[%d] of tests in test : %d\n", i, tids[i]);
>
>    for (i=0;i<nproc;++i)
>    {
>        pvm_recv(-1, -1);
>        pvm_pkint(n, 1, 1);

Change this line to

	 pvm_upkint(&n, 1, 1);

>        printf("\nReturn message from tids : %d\n", n);
>    }
>}

Chris

