萍聚社区-德国热线-德国实用信息网

 找回密码
 注册

微信登录

微信扫一扫,快速登录

萍聚头条

查看: 1503|回复: 10

fortran编译器@linux

[复制链接]
发表于 2005-8-21 16:48 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册 微信登录

x
原帖由 BeBe 于 2005-8-21 16:52 发表
anyway, here is not a board about English or German. I, personally would like to post questions of tech. subjects in an international newsgroup.  like yahoogroup or google online group and so on. U get dozens of replies in one day.
e.g. I'v posted the same ? about fortran@linux in DOlC, MITBBS, and yahoogroup in E. I got the first answer in MITBBS. and then Yahoo, but i got nothing in three days in DOLC. and so i del my post here. But I still believe  there are "dragons and tigers"  in DOLC. let alone in DE.

原帖由 gaga 于 2005-8-21 16:52 发表

要是我看到你的帖子估计会回,因为我也在linux用fortran编译器,可是我不是很有时间。只是工作告一段落后会经常来这里,一来放松,二来和大家交流,互通有无


I am using intel fortran 8.1 for linux with MKL(Math kernel Library 7.21)

Just using the compiler with ddd.

any suggestion or experience are appreciated.  BTW: for Editor i prefer VI and nedit...

[ 本帖最后由 BeBe 于 2005-8-21 18:33 编辑 ]
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
发表于 2005-8-21 17:18 | 显示全部楼层
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
发表于 2005-8-21 17:20 | 显示全部楼层
ifort有点大,一般情况下g95也够用了。也是免费的(不过不开源)。
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
 楼主| 发表于 2005-8-21 17:32 | 显示全部楼层
原帖由 gaga 于 2005-8-21 18:18 发表
测试编译器?
发现有编译器错误了还是?

岂敢,岂敢。
我只是在用ifort编译我的subroutine,并用ddd进行debug.
不过ddd才是“新手上路”$瞧瞧$

特别是Makefile的设置不甚了了。
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
发表于 2005-8-21 17:39 | 显示全部楼层
最简单的是找一个别人的项目里写的简单一些的makefile自己修改一下。
反正到现在我是没有把make的文档看完过,东西太多了。不过对于用来编译项目,应该不会很复杂了。

不知道gcc的fortran编译器你试过没有。文档上说gcc4.0后开始支持f95和2000,不过总是有很多地方没有实现完整,不够用。

调试方面,我喜欢的方式是输出中间结果
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
发表于 2005-8-21 17:50 | 显示全部楼层

Bebe有志气

觉得Bebe有志气,博览各专业论坛。有时也要有点耐心。
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
 楼主| 发表于 2005-8-22 13:59 | 显示全部楼层
About Makefile

Do U know if it is possible/how to set a PATH for Object files, e.g.

  1. # test Makefile for IFORT@linux
  2. #
  3. SOURCE=/home/Bebe/Objects
  4. main:mysub.o
  5.      ifort [options] -o main ${SOURCE}/lib1.o ${SOURCE}/lib2.o [other options]
  6. mysub.o:mysub.f
  7.      ifort [options] mysub.f
复制代码

In /home/Bebe/Objects store all the other libs.o.
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
发表于 2005-8-22 15:08 | 显示全部楼层
原帖由 BeBe 于 2005-8-22 14:59 发表
About Makefile

Do U know if it is possible/how to set a PATH for Object files, e.g.
[code]
# test Makefile for IFORT@linux
#
SOURCE=/home/Bebe/Objects
main:mysub.o
     ifort [options] -o  ...



问题不太明确。
如果是控制目标文件的存放路径,自己在 -o 后面加上路径就可以了。
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
 楼主| 发表于 2005-8-22 20:02 | 显示全部楼层
thanks gaga!
Sorry, If I could not express myslef clearly. ( I still prefer to write in En. PiYing always make my thinking discret :lol )

I would like to compile my subroutine(e.g. mysub.f)  in local DIR. and the other LIBs( namely, lib1.o, lib2.o, lib3.o) in other DIR(e.g. /home/BeBe/Objects). 'cause they are from 3rd-party and ready to use.
Yes! it is possible to write the Makefile like:

#===================================
# test Makefile for IFORT@linux
#
SOURCE=/home/Bebe/Objects
main:mysub.o
     ifort [options] -o main mysub.o\
          ${SOURCE}/lib1.o\
          ${SOURCE}/lib2.o \
          ... ...
          [other options]
mysub.o:mysub.f
     ifort [options] mysub.f
#===================================


There are dozens of LIBs in ${SOURE}, so maybe it is possible to use e.g. -L, so that Makefile search LIBs in the DIR. automatically and no need to add so many ${SOURCE} for each line.

BTW: -o: output excutable file(e.g. main),  "chmod u+x main" not needed  laterly.
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
发表于 2005-8-23 00:05 | 显示全部楼层
Makefile?......
It is a nightmare......
那个Tab键害得我好惨:lol:

[ 本帖最后由 greenflute 于 2005-8-23 07:06 编辑 ]
Die von den Nutzern eingestellten Information und Meinungen sind nicht eigene Informationen und Meinungen der DOLC GmbH.
您需要登录后才可以回帖 登录 | 注册 微信登录

本版积分规则

手机版|Archiver|AGB|Impressum|Datenschutzerklärung|萍聚社区-德国热线-德国实用信息网

GMT+1, 2025-3-12 13:35 , Processed in 0.064872 second(s), 20 queries , MemCached On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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