Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI-IO puzzlement
From: Ricardo Reis (rreis_at_[hidden])
Date: 2012-05-16 06:10:13


  Dear all

  I think I find the culprit.

  I was calculating my offset using

  offset = my_rank*dim

  where dim is the array size. Both my_rank and dim are normal integers and
here lies the rub.

  Fortran (or should I say gfortran?) multiplies my_rank*dim in integer*4
and then converts to integer*8 (the offset type). Basically everything is
lost then because the value converted is already out of range. I've done a
small programme to test this and doing

  offset = INT(my_rank,8)*INT(dim,8)

  works fine (in the test programme, I'm still checking if there is another
problem on the other one)

  Anyway, although is becomes obvious after tracking it I think it can be a
normal pitfall for the unaware...

  best,

  Ricardo Reis

  'Non Serviam'

  PhD/MSc Mechanical Engineering | Lic. Aerospace Engineering

  Computational Fluid Dynamics, High Performance Computing, Turbulence
  http://www.lasef.ist.utl.pt

  Cultural Instigator @ Rádio Zero
  http://www.radiozero.pt

  http://www.flickr.com/photos/rreis/

  contacts: gtalk: kyriusan_at_[hidden] skype: kyriusan

  Institutional Address:

  Ricardo J.N. dos Reis
  IDMEC, Instituto Superior Técnico, Technical University of Lisbon
  Av. Rovisco Pais
  1049-001 Lisboa
  Portugal

                       - email sent with alpine 2.00 -