PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Can byteswapio be enabled for only certain file descriptors?

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



Joined: 21 Jul 2004
Posts: 2

PostPosted: Thu Sep 09, 2004 7:30 am    Post subject: Can byteswapio be enabled for only certain file descriptors? Reply with quote

For example.

fort.10 would be read as little endian, but fort.20 would be read as big endian.....
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Sep 09, 2004 12:21 pm    Post subject: CONVERT Reply with quote

To use byteswapio for a particular file descriptor, add the OPEN specifier "CONVERT=<char expr>", where "<char expr>" is either 'BIG_ENDIAN', 'LITTLE_ENDIAN', or 'NATIVE'. 'LITTLE_ENDIAN' and 'NATIVE' do not do byte-swaping on x86 systems.

- Mat
Back to top
View user's profile
erik



Joined: 29 Jul 2004
Posts: 1

PostPosted: Tue Jan 25, 2005 3:21 pm    Post subject: 'CONVERT=' documentation? Reply with quote

I've used CONVERT=BIG_ENDIAN successfully in the past. However, it's been a while and I was trying to find some pgi documentation on this modifer of the OPEN statement before using it again. I could find none. Perhaps I'm missing some docs or is this maybe deprecated? (I did a case-insensitive grep for "big_endian" on the entire pgi install tree.) FWIW, I tested using -byteswapio instead and it had the same effect on my test data. I will use that from now on unless I need to specify endianness per descriptor as the OP. (Please let me know if you think that is a mistake.)
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jan 25, 2005 5:38 pm    Post subject: Reply with quote

Hi Erik,

We're in the process of updating our rather old Fortran reference manual. I'm glad you asked because it looks like they forgot to add the CONVERT specifier to the OPEN statement documentation. I sent a note off so hopefully we can get this feature included.

Using "-byteswapio" is fine to use and actually recommended over CONVERT if all IO is in BIG_ENDIAN.

Thanks,
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
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