Newsgroups: comp.parallel.pvm
From: Richard Moss <rjm@seymour.chem.ubc.ca>
Subject: receive bug using xlf90 on aix 3.2.5 with 3.3.10
Organization: The University of British Columbia
Date: Tue, 21 Nov 1995 17:58:55 -0800
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <30B283DF.41C6@seymour.chem.ubc.ca>

Hi,

I've got a unexplained bug using 3.3.10 with fortran on aix 3.2.5

I'm using a master/slave config and sending a series of scalars and
arrays to a slave task. (combination of int4's and real8's).  They
are being sent as PvmDataRaw.

The problem comes with receiving an array of int4's.  The array that
is received is about half full of zero's, when the sent array has 
none (checked).  I've checked the various info variables and everything
is ok there.

I've also tacked sending a simple int scalar on the end of the message
and it gets through ok (I thought it could be some weird buffer 
overflow problem as the array coming through with zeros was the last
thing packed).

Here is the code (note this is fortran90)

"master" side:

     call pvmfpack( INTEGER4, child_data(i)%npart, 1, 1, ierr )
     call pvmfpack( REAL8, cell_dim, 1, 1, ierr )
     call pvmfpack( REAL8, dt, 1, 1, ierr )
     
     call pvmfpack( REAL8, left, 1, 1, ierr )
     call pvmfpack( REAL8, right, 1, 1, ierr )
     call pvmfpack( REAL8, bottom, 1, 1, ierr )
     call pvmfpack( REAL8, top, 1, 1, ierr )
     
     call pvmfpack( REAL8, box_x, 1, 1, ierr )
     call pvmfpack( REAL8, box_y, 1, 1, ierr )
     call pvmfpack( INTEGER4, child_data(i)%ncl_x, 1, 1, ierr )
     call pvmfpack( INTEGER4, child_data(i)%ncl_y, 1, 1, ierr )
     
     call pvmfpack( REAL8, to_c_rx, child_data(i)%npart, 1, ierr )
     call pvmfpack( REAL8, to_c_ry, child_data(i)%npart, 1, ierr )
     call pvmfpack( REAL8, to_c_vx, child_data(i)%npart, 1, ierr )
     call pvmfpack( REAL8, to_c_vy, child_data(i)%npart, 1, ierr )
     
     call pvmfpack( INTEGER4, to_c_ptags, child_data(i)%npart, 1, ierr )

     call pvmfpack( INTEGER4, 100134, 1, 1, ierr )
     
     call pvmfsend( child_data(i)%task_id, 0, ierr )


"slave" side:

  call pvmfunpack( INTEGER4, npart, 1, 1, ierr )
  call pvmfunpack( REAL8, cell_dim, 1, 1, ierr )
  call pvmfunpack( REAL8, dt, 1, 1, ierr )
  
  call pvmfunpack( REAL8, bnd_left, 1, 1, ierr ) 
  call pvmfunpack( REAL8, bnd_right, 1, 1, ierr )
  call pvmfunpack( REAL8, bnd_bottom, 1, 1, ierr )
  call pvmfunpack( REAL8, bnd_top, 1, 1, ierr )
  
  call pvmfunpack( REAL8, box_x, 1, 1, ierr )
  call pvmfunpack( REAL8, box_y, 1, 1, ierr )
  call pvmfunpack( INTEGER4, ncl_x, 1, 1, ierr )
  call pvmfunpack( INTEGER4, ncl_y, 1, 1, ierr )
  
  allocate( rx(npart), ry(npart), vx(npart), vy(npart) )
  allocate( ptags(npart) )
  
  call pvmfunpack( REAL8, rx, npart, 1, ierr )
  call pvmfunpack( REAL8, ry, npart, 1, ierr )
  call pvmfunpack( REAL8, vx, npart, 1, ierr )
  call pvmfunpack( REAL8, vy, npart, 1, ierr )

  call pvmfunpack( INTEGER4, ptags, npart, 1, ierr )
  call pvmfunpack( INTEGER4, j, 1, 1, ierr )

The array "ptags" comes into the slave task with about the later half
as zeros (which it isn't in the master).  Sending the 100134 comes
though fine (read correctly as 100134 in slave).

I haven't tried, yet (about to) sending them in XDR, or running the
test suite.

anyone have any clues?

thanks,

Richard
rjm@seymour.chem.ubc.ca

