由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - how to read big_endian data on a little_endian machine with gfortran. Thanks.
相关主题
Fortran和C++的数据转换问题Gfortran library
[合集] Matlab输出的文件怎么读进fortran?懂fortran的帮忙看一下
请教: 关于Fortran编译器fortran90 奇怪的格式问题
Free Fortran compiler for Linux (转载)高手教教怎么在fortran里头call c++的function阿?
compile lammps using fftw-2.1.5 and intel compiler[gfortran]procedures must be either all SUBROUTINEs or all FUNCTIONs
Fortran应该装哪个compiler好?gfortran 编译的问题
刚刚安装了ubuntu,请问哪个fortran compiler好?ANSI C下如何转换十进制小数为十六进制小数
请教Unix中怎么编译Fortun文件为什么两台机器的计算结果不一样?
相关话题的讨论汇总
话题: endian话题: gfortran话题: big话题: machine话题: read
进入Computation版参与讨论
1 (共1页)
m*******s
发帖数: 22
1
Hello everyone,
I have some data files which were originally written with a big_endian
machine.
Now, I try to use a fortran routine to read them with the compiler of
gfortran
built in a little_endian linux system. The input line is as follows:
open(8,file='file1' // cdat,
. form='unformatted',convert='big_endian',
. status='old',access='direct',recl=im*jm*4)
Where cdat is a string, say 198101.
When I compile the routine with gfortran, the system tip is: syntax error,
convert='big_endian'. If I r
O******e
发帖数: 734
2
Try Google "gfortran endian".

【在 m*******s 的大作中提到】
: Hello everyone,
: I have some data files which were originally written with a big_endian
: machine.
: Now, I try to use a fortran routine to read them with the compiler of
: gfortran
: built in a little_endian linux system. The input line is as follows:
: open(8,file='file1' // cdat,
: . form='unformatted',convert='big_endian',
: . status='old',access='direct',recl=im*jm*4)
: Where cdat is a string, say 198101.

1 (共1页)
进入Computation版参与讨论
相关主题
为什么两台机器的计算结果不一样?compile lammps using fftw-2.1.5 and intel compiler
如何在xlswrite中使用strcat定义的文件名,谢谢!Fortran应该装哪个compiler好?
how to convert from little_endian to big_endian with gfortran compiler? Thanks.刚刚安装了ubuntu,请问哪个fortran compiler好?
how to realize the conversion from little_endian to big_endian with gfortran. Thanks.请教Unix中怎么编译Fortun文件
Fortran和C++的数据转换问题Gfortran library
[合集] Matlab输出的文件怎么读进fortran?懂fortran的帮忙看一下
请教: 关于Fortran编译器fortran90 奇怪的格式问题
Free Fortran compiler for Linux (转载)高手教教怎么在fortran里头call c++的function阿?
相关话题的讨论汇总
话题: endian话题: gfortran话题: big话题: machine话题: read