PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Recordtype='fixed'
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
aaronb1013



Joined: 16 Jul 2013
Posts: 1

PostPosted: Wed Jul 17, 2013 10:49 am    Post subject: Recordtype='fixed' Reply with quote

I'm trying to run old code on the PGI Fortran compiler and it does not like the option recordtype in this statement:

open(12,file='blah.dat',form='unformatted', status='old',recl=239, recordtype='fixed', readonly)

I'm trying to read sequentially from a binary file. When I remove the recordtype='fixed' option and try to specify the record length using recl=52 I get a runtime error from the read statement.

Does anyone know the equivalent syntax for recordtype=fixed in the PGFortran compiler?
Back to top
View user's profile
mecej4



Joined: 19 Jun 2011
Posts: 55

PostPosted: Mon Jul 22, 2013 2:12 am    Post subject: Reply with quote

We need to know about the system where the data file was written and any other available information about the OS, compiler used, etc.

Secondly, you mention two different record sizes, and that puzzles me. Where did you get information regarding the record size? What was the unit used in stating record size (remember, some old systems had no concept of "byte") ?
Back to top
View user's profile
JCT_FORTRAN



Joined: 20 Mar 2014
Posts: 4

PostPosted: Thu Mar 20, 2014 8:14 am    Post subject: recordtype='fixed' Reply with quote

I'm having the same problem. So, same question:
Does anyone know the equivalent syntax for recordtype='fixed' in the PGFortran compiler.
Back to top
View user's profile
JCT_FORTRAN



Joined: 20 Mar 2014
Posts: 4

PostPosted: Thu Mar 20, 2014 8:17 am    Post subject: recordtype='fixed' Reply with quote

I should have added that my dataset was written under Microsoft Visual Fortran (Visual F#)
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Mar 21, 2014 8:07 am    Post subject: Reply with quote

Try:
Code:
open(unit=10,file='foo',recl=8,form='unformatted',access='direct')

and then read/write sequentially, i.e., without a rec= specifier

- Mat
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
Goto page 1, 2  Next
Page 1 of 2

 
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