Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] MPI_FILE_SET_ERRHANDLER returns an error with MPI_FILE_NULL
From: Secretan Yves (Yves.Secretan_at_[hidden])
Date: 2010-05-07 16:52:25


Hello,

According to my understanding of the documentation, it should be possible to set the default error handler for files with MPI_FILE_SET_ERRHANDLER. However, the following small Fortran77 program fails, MPI_FILE_SET_ERRHANDLER returns an error.

=================================
      PROGRAM H2D2_MAIN

      INCLUDE 'mpif.h'

      EXTERNAL HNDLR
C------------------------------------------------------------------------

      CALL MPI_INIT(I_ERR)

      I_HDLR = 0
      CALL MPI_FILE_CREATE_ERRHANDLER(HNDLR1, I_HDLR, I_ERR)
      WRITE(*,*) 'MPI_FILE_CREATE_ERRHANDLER: ', I_ERR
      CALL MPI_FILE_SET_ERRHANDLER (MPI_FILE_NULL, I_HDLR, I_ERR)
      WRITE(*,*) 'MPI_FILE_SET_ERRHANDLER: ', I_ERR

      END

      SUBROUTINE HNDLR(I_CNTX, I_ERR)
      WRITE(*,*) 'In HNDLR: MPI Error detected'
      RETURN
      END
============================

Did I miss something obvious?
Regards

Yves Secretan
Professeur
Yves.Secretan_at_[hidden]<mailto:Yves_Secretan_at_[hidden]>

[cid:image001.gif_at_01CAEDF4.2405BF40] Avant d'imprimer, pensez à l'environnement




image001.gif