Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28455 Discussions

forrtl: severe (39): error during read

xyoby
Beginner
400 Views
I have the next problem when i run one program from NRLMRY (simple driver for processing FNMOC ocean qc obs files)

# ./ocn_obs mcsst 2000010100
forrtl: severe (39): error during read, unit 60, file /home/xyoby/work/mau/fortran/topex/mcsst/2000010100.mcsst
Image PC Routine Line Source
ocn_obs 080A15C6 Unknown Unknown Unknown
ocn_obs 080A0425 Unknown Unknown Unknown
ocn_obs 08080B5D Unknown Unknown Unknown
ocn_obs 0805BB4E Unknown Unknown Unknown
ocn_obs 0805B87E Unknown Unknown Unknown
ocn_obs 0806C917 Unknown Unknown Unknown
ocn_obs 0804BD11 Unknown Unknown Unknown
ocn_obs 08049C95 Unknown Unknown Unknown
libc.so.6 40246EA0 Unknown Unknown Unknown
ocn_obs 08049BC1 Unknown Unknown Unknown


part of program is:
.............................................................
if (obs_typ(1:5) .eq. 'mcsst') then
file_name = 'report.mcsst.' // file_dtg
len = len_trim (file_name)
open (45, file=file_name(1:len), status='unknown',
* form='formatted')
write (45, '('' ****** Reading MCSST Data ******'')')
write (45, '('' file date time group: '', a)') file_dtg
write (45, '('' data directory path: '', a)')
* data_dir(1:len_dir)
file_name = data_dir(1:len_dir) // '/mcsst/' //
* file_dtg // '.mcsst'
len = len_trim (file_name)
inquire (file=file_name(1:len), exist=exist)
if (exist) then
open (UNIT, file=file_name(1:len), status='old',
* form='unformatted')
read (UNIT) n_obs, n_lvl, n_vrsn !!!!!!!ERROR IS HERE
write (45, '('' number mcsst obs: '', i10)') n_obs
write (45, '('' max number levels: '', i10)') n_lvl
write (45, '('' file version number: '', i10)') n_vrsn
.............................................................

The same file .f suggest that a compilation can be done using the following (for SGI)

f90 -r4 -i4 -o ocn_obs ocn_obs.f

how ever the parameter -r4 not exist in fortran intel. Instead of this a compiled only with

ifort -i4 -o ocn_obs ocn_obs.f

Could been mistaken this.? The file to read is unformatted , the head of this file is:

^@^@^@^L^@^Du/^@^@^@^A^@^@^@^A^@^@^@^L^@^Q^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^
0 Kudos
2 Replies
Steven_L_Intel1
Employee
400 Views
You don't need -r4 or -i4 - both of those would be the default.

Try adding the following to the OPEN:

convert='big_endian'

From your file dump, it looks as if it were written on a big-endian system such as SGI.
0 Kudos
xyoby
Beginner
400 Views
thank you. its works!!!!
0 Kudos
Reply