MPAS-Dev / MPAS

Repository for private MPAS development prior to the MPAS v6.0 release.
Other
4 stars 0 forks source link

Error message for lacking xtime does not print full message #330

Open mark-petersen opened 9 years ago

mark-petersen commented 9 years ago

When reading a file on restart, if there is only one time in the file and xtime does not match the expected time, line 3002 in mpas_stream_manager.F:

        else if (temp_maxRecords /= 0 .and. whence == MPAS_STREAM_EXACT_TIME) then
            STREAM_ERROR_WRITE('File ' COMMA trim(stream % filename) COMMA ' does not contain the time ' COMMA trim(when))

only produces the output:

File: 

which is misleading to the user.

A short-term solution is to change the line to:

            STREAM_ERROR_WRITE('Correct time was not found in file ' COMMA trim(stream % filename) COMMA ' Looking for time: ' COMMA trim(when))

The best solution is to figure out why trim(stream % filename) cuts the message short.

This was with:

  1) intel/13.1.3             2) openmpi/1.6.5            3) /netcdf/4.4.0            4) /parallel-netcdf/1.5.0   5) /pio/1.7.2
douglasjacobsen commented 9 years ago

It seems like this issue is specific to intel's fpp. It might be that with newer versions of the compiler it works. My guess is that it doesn't like the macro expansion using comma. I'll look into it some more though.