Linux 拨号vps windows公众号手机端

ubuntu如何编译fortran代码

lewis 6年前 (2019-11-13) 阅读数 10 #网络运维
文章标签 ubuntu

ubuntu编译fortran代码的方法:

1.将编译器intel fortran安装好。

2.写一个fortran测试程序,例如:“hello.f90”,代码如下。


program main


write(*,*) "hello"


stop


end


3.使用以下命令进行编译。


ifort -c hello hello.f90


注:编译后生成可执行文件hello 如果直接用ifort hello.f90,则默认生成文件是a.out

4.执行可执行文件,在当前目录下输入以下命令查看结果。


./hello

#或者

./a.out



版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门