Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] problems with parallel MPI-IO...
From: Jonathan Dursi (ljdursi_at_[hidden])
Date: 2011-07-19 10:13:38

On 19 Jul 9:02AM, Alexander Beck-Ratzka wrote:
> integer ierr, i, myrank, BUFSIZE, thefile, intsize
> parameter (BUFSIZE=100)
> integer buf(BUFSIZE)
> do i=0,BUFSIZE
> buf(i) = myrank*BUFSIZE + i
> print*, 'i =', i, 'myrank =', myrank, 'buf(i)=',buf(i)
> end do
> When I am reading the data in again and print them out, I always have:
> buf(0)=0

If you compile your code with -check bounds and run, you'll get an error
pointing out that buf(0) is an illegal access; in Fortran arrays start at 1.

        - Jonathan

Jonathan Dursi | SciNet, Compute/Calcul Canada