IOSTAT error #202 on write

Hi,

I’m using v10.8 of pgf90 on a Cray XT4. I’m encountering an error 202 when trying to write to a simple unformatted direct-access file. This error occurs within a code that uses MPI, but only the root processor opens, writes, and closes this file.

Reading about the error, I find that a 202 error is:

202 conflicting specifiers
Conflicting specifiers have been passed to an I/O runtime routine. Example: within an OPEN statement, form=‘unformatted’, blank=‘null’.

The file is opened using:

open(nhisp,err=4000,file=path_sav_hp,

  •    form='unformatted',access='direct',recl=isize*j_recl,
    
  •    status='unknown')
    

and written to using:

write(nhisp,err=999,rec=krec,iostat=ios) (f32(i),i=1,num)

It’s a fairly boring piece of fortran. The code exits to 999 after the first attempt to write to ‘nhisp’ at krec=1, exiting with ios = 202.

What I’m having trouble understanding is that this identical code ran on the same machine within the last month perfectly fine. It was able to write this file as expected. So, there were no ‘conflicting specifiers’ during the original calculation. I’m now restarting from the last volume generated during the original calculation. The restart file is read cleanly, and after 50 steps, the code attempts to execute this write statement to output a small amount of data, and terminates.

Is there any chance there’s another interpretation of an error 202? Is there something obvious that I’m missing? Any chance I’m encountering a bug in the compiler?

Thanks for any help someone might be able to offer.

Hi egpatton,

Unfortunately, I don’t see anything obvious. My best guess would be that ‘nhisp’ is some how getting corrupted and the wrong unit number is being passed in, or the same unit number is being used for multiple files. What’s the value of ‘nhisp’ when you open the file and when the erroneous write occurs?

  • Mat