爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 9969|回复: 14

readv3.f安装遇到的问题?

[复制链接]

新浪微博达人勋

发表于 2014-8-9 21:45:56 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
              在安装readv3.f时按照提示的
This utility program is written in free-format Fortran 90.
!   It requires a Fortran 90 compiler to compile.
!
! On a DEC_Alpha machine, type the following to compile:
!   f90 -free -convert big_endian readv3.f
!
! On SGI, type
!   f90 -freeform readv3.f
!                  
! On Linux machine, type
!   pgf90 -Mfreeform -pc 32 -byteswapio readv3.f
!
! On IBM, type
!   xlf -qfree=f90 readv3.f
!
!
! To run, type
!   a.out v3-filename


我的是linux系统,是64位,具体的 -Mfreeform -pc 32 -byteswapio代表的含义不懂?还有我的编译器是gfortran,应该不影响吧?请各位大神帮一下忙
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-8-9 22:25:37 | 显示全部楼层
gfortran -ffree-form -m32 -fconvert=swap readv3.f
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-9 22:38:02 | 显示全部楼层
longlivehj 发表于 2014-8-9 22:25
gfortran -ffree-form -m32 -fconvert=swap readv3.f

谢谢,好像可以运行,但是我用a.out MMOUT_DOMAIN1怎么打不开呢?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-9 22:40:38 | 显示全部楼层
longlivehj 发表于 2014-8-9 22:25
gfortran -ffree-form -m32 -fconvert=swap readv3.f

没有成功,你看一下这是结果
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgfortran.so when searching for -lgfortran
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgfortran.a when searching for -lgfortran
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.so when searching for -lquadmath
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.a when searching for -lquadmath
/usr/bin/ld: cannot find -lquadmath
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld 返回 1
renhehe@renhehe-OptiPlex-9020:~/bin/mm5V3-7-0/MM57$ cd Run
renhehe@renhehe-OptiPlex-9020:~/bin/mm5V3-7-0/MM57/Run$ gfortran -ffree-form -m32 -fconvert=swap readv3.f
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgfortran.so when searching for -lgfortran
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgfortran.a when searching for -lgfortran
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.so when searching for -lquadmath
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.a when searching for -lquadmath
/usr/bin/ld: cannot find -lquadmath
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld 返回 1
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-8-9 22:42:20 | 显示全部楼层
renjia 发表于 2014-8-9 22:38
谢谢,好像可以运行,但是我用a.out MMOUT_DOMAIN1怎么打不开呢?

出错?还是?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-9 22:43:10 | 显示全部楼层

我又发了个你看看
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-8-9 22:44:16 | 显示全部楼层
renjia 发表于 2014-8-9 22:40
没有成功,你看一下这是结果
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/l ...

编译64位的试试吧

gfortran -ffree-form -m64 -fconvert=swap readv3.f
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-9 23:20:47 | 显示全部楼层
longlivehj 发表于 2014-8-9 22:44
编译64位的试试吧

gfortran -ffree-form -m64 -fconvert=swap readv3.f

好的    谢谢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-8-10 09:00:56 | 显示全部楼层
longlivehj 发表于 2014-8-9 22:44
编译64位的试试吧

gfortran -ffree-form -m64 -fconvert=swap readv3.f

运行后出现:
/tmp/ccqddhKR.o: In function `arguments_':
readv3.f:(.text+0x971): undefined reference to `iargc_'
collect2: ld 返回 1
想问一下gfortran -ffree-form -m64 -fconvert=swap readv3.f这句话每一项代表的含义?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-8-10 17:29:58 | 显示全部楼层
renjia 发表于 2014-8-10 09:00
运行后出现:
/tmp/ccqddhKR.o: In function `arguments_':
readv3.f:(.text+0x971): undefined refere ...

在readv3.f中找到integer, external :: iargc这一行,注释掉,就是前面加个!号,然后再编译。改用gfortran,external是没有必要的。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表