Newsgroups: comp.parallel.pvm
From: b55deel@harc.edu (Dennis R. Ellis)
Subject: Re: a little problem
Organization: Houston
Date: 1 Dec 1995 16:28:34 GMT
Message-ID: <49nafi$ii1@spectre.star.harc.edu>

  I may be missing something here, but I would code this as follows:

fft (s950062@logic.csc.cuhk.hk) wrote:

:     float mat[4][4],vec[4];
:     n = 4; nproc=n; int k;
:         r=0;
          ^^^ get rid of this!!!!!

:         for (k=0; k<nproc ; k++)
:         {        
: 	pvm_initsend(PvmDataDefault);
: 	pvm_pkint(&nproc, 1, 1);
: 	pvm_pkint(tids, nproc, 1);
: 	pvm_pkint(&n, 1, 1);
: 	pvm_pkfloat(vec, n, 1);
:         pvm_pkfloat(mat[r], 1, 1);   /* anything wrong here? */

          change this to:
             for (l=0; l<n; l++)
               pvm_pkfloat(mat[k][l],1,1);

:         pvm_send(tids[k],0);
:         r++;
:         }

+-----------------------+----------------------------+-------------------------+
| Dennis R. Ellis       | HNSX Supercomputers Inc.   | Still looking for a     |
| Sr. Benchmark Analyst | 10077 Grogan's Mill        |  witty saying by a      |
| Ellis@hstc.necsyl.com | The Woodlands, TX  77380   |   famous person....     |
| (713) 364-0034        | -- All the normal stuff about opinions being mine -- |
+-----------------------+------------------------------------------------------+

