BeBe 发表于 2005-8-21 16:48

fortran编译器@linux

原帖由 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 believethere 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 编辑 ]

gaga 发表于 2005-8-21 17:18

测试编译器?
发现有编译器错误了还是?

gaga 发表于 2005-8-21 17:20

ifort有点大,一般情况下g95也够用了。也是免费的(不过不开源)。

BeBe 发表于 2005-8-21 17:32

原帖由 gaga 于 2005-8-21 18:18 发表
测试编译器?
发现有编译器错误了还是?
岂敢,岂敢。
我只是在用ifort编译我的subroutine,并用ddd进行debug.
不过ddd才是“新手上路”$瞧瞧$

特别是Makefile的设置不甚了了。

gaga 发表于 2005-8-21 17:39

最简单的是找一个别人的项目里写的简单一些的makefile自己修改一下。
反正到现在我是没有把make的文档看完过,东西太多了。不过对于用来编译项目,应该不会很复杂了。

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

调试方面,我喜欢的方式是输出中间结果

maxBaby 发表于 2005-8-21 17:50

Bebe有志气

觉得Bebe有志气,博览各专业论坛。有时也要有点耐心。

BeBe 发表于 2005-8-22 13:59

About Makefile

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

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

In /home/Bebe/Objects store all the other libs.o.

gaga 发表于 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.

# test Makefile for IFORT@linux
#
SOURCE=/home/Bebe/Objects
main:mysub.o
   ifort -o...


问题不太明确。
如果是控制目标文件的存放路径,自己在 -o 后面加上路径就可以了。

BeBe 发表于 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 -o main mysub.o\
          ${SOURCE}/lib1.o\
          ${SOURCE}/lib2.o \
          ... ...
         
mysub.o:mysub.f
   ifort 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 neededlaterly.

greenflute 发表于 2005-8-23 00:05

Makefile?......
It is a nightmare......
那个Tab键害得我好惨:lol:

[ 本帖最后由 greenflute 于 2005-8-23 07:06 编辑 ]
页: [1] 2
查看完整版本: fortran编译器@linux