Trap Fortran I/O errors for mpi jobs

Trap Fortran I/O errors for mpi jobs

I am trying to find out if there is any way to create an error-handler or something else that will trap an error exit from the run-time library due to a fortran I/O error.

 

Let me expand a little. I am working with a very larger fortran 90 code written by many people that uses mpi. While some of the read/write statements have an ERR= in them, not all do and it is a big job to add this to everyone (and not miss some). With some flavors of mpi (openmpi is one) if one process encounters an I/O error that process will crash, and the other ones can hang because no termination/abort signal is sent to them this seems to be implementation dependent.

 

I have added some c/icc signal handlers and while these work and can be used to send an mpi_abort signal, none of them catch a fortran I/O error.

Professor Laurence Marks

Department of Materials Science and Engineering MSE Rm 2036 Cook Hall 2220 N Campus Drive Northwestern University Evanston, IL 60208, USA Tel: (847) 491-3996 Fax: (847) 491-7820

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Unfortunately not. There is a feature request in to add this functionality, but it is not currently on the list for implementation.

Steve - Intel Developer Support

As a addendum/continuation, I isolated that there is an issue with an end-of-file error, i.e. not enough data during a read and (at least, possibly others) openmpi-1.4.1. This can end up leaving some zombie mpi processes behind, not sure exactly what they are doing (no obvious CPU usage). This is perhaps something associated with how ifort is trapping end-of-file and openmpi abort/termination signals which could be trapped if there was a way to catch this error with a handler.

In Fortran Composer XE 2013 SP1, compiler version 14.0, we added an ESTABLISHQQ routine that allows you to specify a function to be called when the run-time library is about to report an error.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today