Previous Thread
Next Thread
Print Thread
Big Endian and Little Endian
#17382 03/08/08 07:16 PM
Joined: Mar 2005
Posts: 61
R
rossi Offline OP
Forum Member
OP Offline
Forum Member
R
Joined: Mar 2005
Posts: 61
Hello Everyone:

I have many GB of binary trajectories calculated on an IBM AIX system (Big Endian) which I have not yet analyzed.

It looks like I will have to move to a Linux (Little Endian) system soon.

Is it possible to compile a version of CHARMM on the Linux system which will read the Big Endian trajectory files?

I appreciate your comments.

Warm regards,

Angelo

Re: Big Endian and Little Endian
rossi #17383 03/08/08 07:43 PM
Joined: Sep 2003
Posts: 8,506
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,506
More recent versions of both CHARMM (c33b1 and later) and gfortran (4.2.x) have facilities for handling endian conversions. I believe several commercial compilers have endian conversion features as well. There can still be binary compatibility issues, however, based on the length (4- vs. 8-byte) of the binary record pointer. Not all OS or compiler I/O routines have handled this in the same way, which can lead to problems.

As a last resort (there is some precision loss), the DYNA FORMat and DYNA UNFOrmat commands (dynamc.doc) can be used to transfer the files. Be sure to set up CRYSTAL if it was used for the simulations, or else the unit cell info will be lost. For each file,

[1] use DYNA FORMat on AIX to create custom text based transfer formatted file
[2] copy transfer format file to Linux
[3] use DYNA UNFOrmat to read the transfer format file and write a new binary trajectory file

Re: Big Endian and Little Endian
rmv #17384 03/10/08 03:31 PM
Joined: Nov 2003
Posts: 36
Forum Member
Offline
Forum Member
Joined: Nov 2003
Posts: 36
I know this isn't a NAMD forum, but occasionally they do have some useful tools that come in handy. Members of our lab working on multiple platforms have put the flipdcd tool from UIUC to good use when moving files over for post analysis.

http://www.ks.uiuc.edu/Development/MDTools/flipdcd/

Enjoy!


Joshua Ward Graduate Student Purdue University Department of Medicinal Chemistry and Pharmacology
Re: Big Endian and Little Endian
rossi #17385 03/10/08 03:44 PM
Joined: Sep 2003
Posts: 4,797
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,797
Likes: 2
ifort and gfortran allow compilation with big_endian for file I/O; this can also be specified with environment variables at runtime. CHARMM install.com also takes a flag (big_e) which inserts the appropriate flag for ifort.

ifort -convert big_endian
(Several possibilities for environment variables. To use big_endian format on files opened on unit 88: export FORT_CONVERT88=BIG_ENDIAN).

gfortran -fconvert=big-endian
(environment variable GFORTRAN_CONVERT_UNIT)


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.010s Queries: 22 (0.005s) Memory: 0.9138 MB (Peak: 0.9981 MB) Data Comp: Off Server Time: 2020-10-29 08:30:50 UTC
Valid HTML 5 and Valid CSS