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

...a continuation of my previous post.

I tried compiling a very simple master/slave program in f77 that
simply passes an int array from a master task to three slaves.

In this version the array that is passed isn't recieved correctly,
but is received as if it had stride set to 2.

The code I just tried is:

master:
      program parent2
      include 'f90pvm3.h'
      integer*4 ints(30)
      integer i, ierr, mytid, ibuf
      integer child_data(3)
      
      do i = 1, 30
         ints(i) = i
      enddo
      call pvmfmytid( mytid )
      do i = 1, 3
         call pvmfspawn( 'test_child', 0,
     $        'anywhere', 1, child_data(i), ierr )
         if ( ierr .ne. 1 ) then
            print*,'couldnt spawn'
            call pvmfexit(ierr)
            stop
         endif
      enddo
      do i = 1, 3
         call pvmfinitsend( PvmDataDefault, ibuf )
         call pvmfpack( INTEGER4, ints, 30, 1, ierr )
         call pvmfsend( child_data(i), 0, ierr )
      enddo
      call pvmfexit(0)
      end 

slave:


      program child2
      include 'f90pvm3.h'
      integer*4 ints(30)
      integer mytid, ierr, pa, ibuf, i
      
      call pvmfmytid( mytid )
      call pvmfparent( pa )
      write(mytid,*) 'my id: ', mytid
      call pvmfrecv( pa, 0, ibuf )
      call pvmfunpack( INTEGER4, ints, 30, 1, ierr )
      do i = 1, 30
         write(mytid,*) i,' ', ints(i)
      enddo
      end

The output files from the child tasks, which _should_ be a simple
1d array going from 1 to 30 are:

element: 1 2 3 4....15 16..........30
value:   1 3 5 7....29 0  0 0 0 ....0      
      
The array seems to be got with stride two!

This was compiled with 3.3.10 on aix 3.2.5 using "f77 -u -g -C"

...I'm off to recompile the pvm code without -O.


Any ideas?

Richard

