PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

strange io errors

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
wl2776



Joined: 17 Apr 2006
Posts: 6

PostPosted: Fri Apr 21, 2006 2:47 am    Post subject: strange io errors Reply with quote

I am trying to run CCSM3 and get errors, while it tries to read data from the binary files (restart files).

With the compiler version 6.1-2:
PGFIO/stdio: No such file or directory
PGFIO-F-/unformatted read/unit=10/error code returned by host stdio - 2.
File name = b30.031.cpl6.r.0821-01-01-00000 unformatted, sequential access record = 2
In source file /home/veremeev/ccsm3_0/models/csm_share/cpl/cpl_iobin_mod.F90, at line number 233

With the compiler version 6.1-4:
PGFIO/stdio: Success
PGFIO-F-/unformatted read/unit=10/error code returned by host stdio - 0.
File name = b30.031.cpl6.r.0821-01-01-00000 unformatted, sequential access record = 2
In source file /home/veremeev/ccsm3_0/models/csm_share/cpl/cpl_iobin_mod.F90, at line number 233

The errors occur only on the files, downloaded from the NCAR.
They do not occur with the files, produced locally.

More details on the errors are here.
http://bb.cgd.ucar.edu/showthread.php?p=802#post802

The restart files are plain binary files.

The failing code is:
Code:
231:   open(fid,file=fName,form="UNFORMATTED",status="OLD")
232:   read(fid) format     ! string len=256
233:   read(fid) name       ! string len=256
234:   read(fid) dstr,tstr  ! string len=256 * 2
235:   read(fid) comment    ! string len=256
236:   read(fid) cvsID      ! string len=256


I have added line numbers on the left, actually there are no line numbers in the file.

I have put the write statements after the line 232, and they gave the following.
Variable values before execution of this fragment:
fid=10
fName=b30.031.cpl6.r.0821-01-01-00000

The file is situated in the current working directory, getcwd confirms this.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6207
Location: The Portland Group Inc.

PostPosted: Fri Apr 21, 2006 10:59 am    Post subject: Reply with quote

Hi Vladimir,

It looks like a byte-swaping problem. Did you compile with "-byteswapio"? If not, can you try adding this flag?

- Mat
Back to top
View user's profile
wl2776



Joined: 17 Apr 2006
Posts: 6

PostPosted: Mon Apr 24, 2006 12:15 am    Post subject: Reply with quote

Thank you, it worked!

I have also answered in the other my topic, about 'save'`d variables, the compiler upgrade didn't help, the variables are still not saved.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group