"forrtl: severe (36): attempt to access non-existent record" and "-assume byterecl"

"forrtl: severe (36): attempt to access non-existent record" and "-assume byterecl"

Hello Everyone,

I run in a "Intel Core 2 Quad", "64bit" with "CentOS 5.2" and an "ifort 9.1" compiler.

I'm trying to run a program (read_3D.f) which reads two binary files (coordinates.MED8, OM8-26_T_y1961.dimg,
which are little_endian files and also my machine is little_endian)

when i use " ifort -o read_3D read_3D.f " i get the next error :

forrtl: severe (36): attempt to access non-existent record, unit 30, file /mnt/skyladata/vervatis/phd/ARPERA/OPAMED8/OM8-26/coordinates.MED8
Image PC Routine Line Source
read_3D 00000000004405AE Unknown Unknown Unknown
read_3D 000000000043EBDE Unknown Unknown Unknown
read_3D 0000000000427080 Unknown Unknown Unknown
read_3D 0000000000406A72 Unknown Unknown Unknown
read_3D 00000000004066D3 Unknown Unknown Unknown
read_3D 0000000000414D4D Unknown Unknown Unknown
read_3D 00000000004137AA Unknown Unknown Unknown
read_3D 0000000000402F74 Unknown Unknown Unknown
read_3D 000000000040260A Unknown Unknown Unknown
libc.so.6 000000391221D8B4 Unknown Unknown Unknown
read_3D 0000000000402529 Unknown Unknown Unknown

It seems it doesn't reads correctly the first binary file (coordinates.MED8).
I solved this problem using " ifort -assume byterecl -o read_3D read_3D.f "
BUT now although it reads all the files without any error message the final
output is incorrect (i know this because i had already run the program in a
different machine with ifc compiler and i saw the correct output files)

The incorrect output is full of NaNs and wrong numbers :

Read of the model grid
File name to deal with ?
OM8-26_T_y1961.dimg
OM8-26_T_y1961.dimg

recl= 262144
Entete lu cltext=
opa model output for T

jpi= 394 jpj= 160 jpk= 43
nt= 1 ndim= 1
xwest= -11.00000 ysouth= 30.00000 dx= 0.1250000 dy=
0.1250000 spval= 0.0000000E+00
gdept: 1.000000 2.000000 3.000000 4.000000
5.000000 6.000000 7.000000 8.000000 9.000000
10.00000 11.00000 12.00000 13.00000 14.00000
15.00000 16.00000 17.00000 18.00000 19.00000
20.00000 21.00000 22.00000 23.00000 24.00000
25.00000 26.00000 27.00000 28.00000 29.00000
30.00000 31.00000 32.00000 33.00000 34.00000
35.00000 36.00000 37.00000 38.00000 39.00000
40.00000 41.00000 42.00000 43.00000
ztimm: 151.0000
level number, level depth (m), field mean
level 1 2.721214180139299E-312 field= NaN
level 2 4.754889570654986E-312 field= NaN
level 3 4.080781622494748E-312 field= NaN
level 4 4.090071192434195E-312 field= NaN
level 5 1.376236227850033E-312 field= NaN
level 6 6.808785216375966E-313 field= NaN
level 7 1.364296453739264E-312 field= NaN
level 8 6.823838392663356E-313 field= NaN
level 9 1.792128443596228E-314 field= NaN
level 10 1.371311722990462E-312 field= NaN
level 11 1.482391243660936E-314 field= NaN
level 12 2.736912968843867E-312 field= NaN
level 13 4.078952593687258E-312 field= NaN
level 14 4.081282275260931E-312 field= NaN
level 15 4.761961581725074E-312 field= NaN
level 16 4.077400032948110E-312 field= NaN
level 17 1.529084794970617E-314 field= NaN
level 18 2.730266219126327E-312 field= NaN
level 19 6.661962196402568E-316 field= NaN
level 20 1.348831813574178E-314 field= NaN
level 21 1.367376098188941E-312 field= NaN
level 22 3.413752154897790E-312 field= NaN
level 23 3.396261300136283E-312 field= NaN
level 24 4.755934900361266E-312 field= NaN
level 25 3.400719909154977E-312 field= NaN
level 26 2.732876651408411E-312 field= NaN
level 27 4.076616824592424E-312 field= NaN
level 28 1.374069201856829E-312 field= NaN
level 29 2.736977147734111E-312 field= NaN
level 30 4.091439655301945E-312 field= NaN
level 31 1.359162528286258E-312 field= NaN
level 32 2.724997218497264E-312 field= NaN
level 33 1.692410470746609E-314 field= NaN
level 34 6.930097864228356E-313 field= NaN
level 35 4.306948730834676E-315 field= NaN
level 36 3.403681004410621E-312 field= NaN
level 37 4.080934599763993E-312 field= NaN
level 38 2.717841451837883E-312 field= NaN
level 39 1.955005871398111E-314 field= NaN
level 40 4.756120471734046E-312 field= NaN
level 41 3.397839178538235E-312 field= NaN
level 42 3.402443810911497E-312 field= NaN
level 43 3.398593292514270E-312 field= NaN
Volume mean of the 3D field: NaN
Med Sea Volume (en m3) NaN

while the correct output is:

Read of the model grid
File name to deal with ?
OM8-26_T_y1961.dimg
OM8-26_T_y1961.dimg
recl= 262144
Entete lu cltext=
opa model output for T
jpi= 394 jpj= 160 jpk= 43
nt= 1 ndim= 1
xwest= -11.00000 ysouth= 30.00000 dx= 0.1250000 dy=
0.1250000 spval= 0.000000
gdept: 1.000000 2.000000 3.000000 4.000000
5.000000 6.000000 7.000000 8.000000
9.000000 10.00000 11.00000 12.00000
13.00000 14.00000 15.00000 16.00000
17.00000 18.00000 19.00000 20.00000
21.00000 22.00000 23.00000 24.00000
25.00000 26.00000 27.00000 28.00000
29.00000 30.00000 31.00000 32.00000
33.00000 34.00000 35.00000 36.00000
37.00000 38.00000 39.00000 40.00000
41.00000 42.00000 43.00000
ztimm: 151.0000
level number, level depth (m), field mean
level 1 3.130000114440918 field= 19.56273
level 2 9.765776634216309 field= 19.46997
level 3 17.01684188842773 field= 19.25546
level 4 25.08886337280273 field= 18.82719
level 5 34.14731597900391 field= 18.03424
level 6 44.39130020141602 field= 17.33172
level 7 56.05698394775391 field= 16.71137
level 8 69.42432403564453 field= 16.21648
level 9 84.82568359375000 field= 15.84154
level 10 102.6503448486328 field= 15.57338
level 11 123.3546142578125 field= 15.39758
level 12 147.4680786132813 field= 15.28699
level 13 175.6006774902344 field= 15.19652
level 14 208.4479675292969 field= 15.10453
level 15 246.7940521240234 field= 14.99729
level 16 291.5094604492188 field= 14.86965
level 17 343.5449218750000 field= 14.71652
level 18 403.9166259765625 field= 14.58485
level 19 464.5644531250000 field= 14.43785
level 20 535.2041015625000 field= 14.27602
level 21 613.8048095703125 field= 14.09894
level 22 700.7341918945313 field= 13.92110
level 23 796.2561645507813 field= 13.73495
level 24 900.5160522460938 field= 13.56455
level 25 1013.532531738281 field= 13.42487
level 26 1135.196777343750 field= 13.33471
level 27 1265.278076171875 field= 13.26870
level 28 1403.437744140625 field= 13.22665
level 29 1549.245605468750 field= 13.19507
level 30 1702.202880859375 field= 13.17103
level 31 1861.762939453125 field= 13.15030
level 32 2027.354003906250 field= 13.13353
level 33 2198.398437500000 field= 13.11433
level 34 2374.328369140625 field= 13.09646
level 35 2554.599609375000 field= 13.07715
level 36 2738.700439453125 field= 13.11819
level 37 2926.157714843750 field= 13.28163
level 38 3116.540039062500 field= 13.25291
level 39 3309.458984375000 field= 13.21087
level 40 3504.568115234375 field= 13.24794
level 41 3701.561767578125 field= 13.35086
level 42 3900.171142578125 field= 13.35035
level 43 4100.162597656250 field= NaN
Volume mean of the 3D field: 13.89872
Med Sea Volume (en m3) 3.9380840E+15

Any suggestions in order to run the program correctly in my current machine?
Thanks in advance...

p.s.
Additional informations about the program are:

1)

CCCCCCCCCCCCCCCCCCCCCCCC
C Read of the coordinate file
CCCCCCCCCCCCCCCCCCCCCCCC
OPEN(numcoo,FILE='coordinates.MED8',
& form='unformatted',status='unknown',
& access='direct',recl=nrecl8med)

2)

CCCCCCCCCCCCCCCCCCCCCCCCC
C read of the dimg file
CCCCCCCCCCCCCCCCCCCCCCCCC
print *, 'File name to deal with ?'
read(*,*) filnam
print*,filnam
C
numwri=40
C
iversion=1
C
open(numwri,file=filnam,form='unformatted',
& access='direct',recl=100)
read(numwri,rec=1) clver,line1,irecl
print *, 'recl=',irecl
close(numwri)

istat=0
open(numwri,file=filnam,form='unformatted',status='old',
& iostat=istat, access='direct',recl=irecl)

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

There are a number of posts in this forum related to numerical issues. There is no one magic set of options that work universally. Generally, I would start with

-O0 -g -traceback -check all -fp-model precise -fp-stack-check

and then start to work your way up to -O2 -xhost instead of -O0

ron

Quoting - Ronald Green (Intel)
There are a number of posts in this forum related to numerical issues. There is no one magic set of options that work universally. Generally, I would start with

-O0 -g -traceback -check all -fp-model precise -fp-stack-check

and then start to work your way up to -O2 -xhost instead of -O0

ron

Thanks for the response Ron,

i've already solve it... it was a big little endian issue for the second file...
anyway i'll try as a test ur options in the compilation file...

Thanks again..

Leave a Comment

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