由买买提看人间百态

topics

全部话题 - 话题: f77
首页 上页 1 2 (共2页)
c******n
发帖数: 7
1
来自主题: Unix版 - GCC 一问
不知道两者区别在哪儿?不知道Solaris9 自带gcc,g++,和f77吗?
谢谢!

者有
m****t
发帖数: 2684
2
来自主题: Unix版 - [转载] 分特,一个弱问题
cc -> gcc
f77 -> g77
man gcc
man g77
g***i
发帖数: 90
3
来自主题: Computation版 - Fortran里面哪个函数显示系统时间?
有很多函数的
f77下(应该)可以
program when
integer*4 today(3), now(3)
call idate(today) ! today(1)=day, (2)=month, (3)=year
call itime(now) ! now(1)=hour, (2)=minute, (3)=second
write ( *, 1000 ) today(2), today(1), today(3), now
1000 format ( 'Date ', i2.2, '/', i2.2, '/', i4.4, '; time ',
& i2.2, ':', i2.2, ':', i2.2 )
stop
end
f90下:date_and_time()
这里是一个例子:输出当前一时间点(有点象cputime)
subroutine comp_time(tm)

real*16 tm
h***o
发帖数: 539
4
来自主题: Computation版 - Fortran里面哪个函数显示系统时间?
f77 na?
t****n
发帖数: 39
5
来自主题: Computation版 - where to down a standard Fortran90 complier?
What's the extension of your fortran source file? Some f90 compiler support
both f90 and f77. You must end your source file with .f90 then the compiler
will consider it as a F90 file. Just my 2 cents. :)
w*******g
发帖数: 99
6
来自主题: Computation版 - Write In C
Fortran is better than C and CPP for traditional scientific computing, as least
a lot of resources are avaiable... Even though I myself mostly write code in
Fortran 90 and C++, F77 is still the best if speed is concerned...
h***o
发帖数: 539
7
来自主题: Computation版 - Write In C
I will try to use f90 for my phd thesis
f77 is really awkward
h***o
发帖数: 539
8
来自主题: Computation版 - Write In C
really?
that's bad...I just hate f77's style
t****n
发帖数: 39
9
来自主题: Computation版 - Write In C
Well, the speed of F90 is comparable with F77, if you don't use the pointer.
The compiler always fails to optimise the code whtn there were a lot
of pointers.
g***i
发帖数: 90
10
definitely emacs or xemacs is much better for f77/f90
//surely u need those packages
t*****o
发帖数: 74
11
来自主题: Computation版 - 偶也问一fortran问题
偶以前用F77编译, 最后文件大小是12MB
最近换成F90, 文件大小一下子变成50多M
然后学校最近好象又升级了一下系统, 现在变成60多M
有些受不了了, 总共也就300M空间 。。。
有什么方法让它减肥吗? 偶用 F90 -c -O3
h***o
发帖数: 539
12
来自主题: Computation版 - How to compile F77 file with C ?
www.google.com
t****n
发帖数: 39
13
来自主题: Computation版 - 详细介绍Fortran 77的站点
Strongly suggest f90 over f77. With f90, you can get Modular programming,
dynamic memory allocate/dallocate, free programming format. And you are
also going to note a little loss of efficiency, though it's very small.
The following web site has a lot of materils you need:
http://www.liv.ac.uk/HPC/F90page.html
y***r
发帖数: 1845
14
来自主题: Computation版 - Fortran 77 dynamic memory allocation 2
不用cray pointer也可以,可以使用libU77中的MALLOC和FREE,可惜不是所有系统都
支持。但假如自己用C做一个EXTENSION,就可以了。
下面的程序的编译方法:
cc -c alloc.c
f77 memtest.f alloc.o
>>>>>>> memtest.f <<<<<<<<<<<
implicit none
integer*4 n, i
integer*4 addr
integer*4 offset
real*8 work(1)
C common /works/ work
n = 10
call cmalloc(N*N, 8, 0, work, addr, offset)
call test(N, WORK(offset+1))
call cfree(addr)
end
C
subroutine test(N,R)
implicit none
integer*4
S***y
发帖数: 186
15
If you're using Fortran 77, the restriction is still there.
Even though your compiler allows you using more than 6 characters,
it's just the extension of your compiler, rather than the standard of F77.
If you're using Fortran 90, there is no restriction on the length
of the variable names. This is the standard that any F90 compiler
should comply with.
bd
发帖数: 21
16
visual fortran默认是F90吧,其实我用的语法是F77的,但测试时发现确实可以区分6位
以上的。
s*******s
发帖数: 133
17
来自主题: Computation版 - Fortran77中
F77中从一个data file读数据出来,
想从第10行读到第50行,用什么格式?
read ......
format(10n ..?)
thanks
s***c
发帖数: 113
18
what i know is like 'sir' said, compaq visual fortran 6.6.
i need to use fortran in both windows and linux. there is already a
compiler on linux. i need one for windows.
where to get cygwin g77/f77? thanks so much.
i guess most of codes i am using are written in fortran77, not 90 or 95.
l**g
发帖数: 5
19
来自主题: Computation版 - problem about Fortran 77 in unix
"If a program gets a bus error (SIGBUS), it usually has some problems with
misaligned data."
可能是caller传递的数组的类型和subroutine中的数组a的类型不一致引起的。
比如说前者是byte,a是word.如果a(i)的地址没对齐成奇数就有bus error。
这大概是自动数组a(0:node)和a(1:node)结果不同的原因。
去年为什么可以?也许今年f77升级,default不一样了;
或者有其它影响complier行为的原因。参考:
Bus Error--Finding the Line Number
http://docs.sun.com/db/doc/802-2997/6i6u2n7rt?a=view#07.Debugging-27

several
w**d
发帖数: 2334
20
来自主题: Computation版 - problem about Fortran 77 in unix
I asked the same problem on a Fortran newsgroup. Somebody suspected it might
be caused by a compiler bug. I don't know what that means.
That guy also thinks I used F90 compiler. He said the automatic array is
illegal in F77.
Then another guy suggests me to do as follows:
program main
real*8 a(0:10)
call sub(a)
end
subroutine sub(b)
real*8 b(*)
b(0) = 7
end
It is just like those subroutines in Lapack. But there are lots of
work arrays in my code, I don't know how realistic this way is.
l**g
发帖数: 5
21
来自主题: Computation版 - problem about Fortran 77 in unix
1。这里应该有错:
real*8 b(*) == real*8 b(1:)
所以这里 b(0) 是 bound violation,a(0)的值并不会改变。
2。我觉得你的程序是不是不自觉地引用指针,引起内存访问出错。比如
subroutine sub(b1,N)
real*8 b1(0:N)
b(0) = 7
end
subroutine sub(N)
real*8 b2(0:N)
b(0) = 7
end
其中b1是双精度数组;但fortran把b2解释为local指针数组,指向double.
前者是对的,后者就会出错。
命令g77/f77执行的可能是f90 或 f95

if
h***o
发帖数: 539
22
来自主题: Computation版 - fortran菜鸟一问
有个程序在sun下面用f77编得好好得,放到linux下面用g77就报错了
amie.f: In subroutine `genpnm':
amie.f:356:
REAL*16 PNMD,DPNMDTD,PNME,DPNMDTE,AK,AKE
1 2
Invalid kind at (2) for type at (1) -- unsupported or not permitted
请问这玩艺怎么修改?
谢了
w**w
发帖数: 5391
23
来自主题: Computation版 - 老板的程序在unix上运行没问题
depends on compiler. use f77 instead of g77.
w**w
发帖数: 5391
24
来自主题: Computation版 - 老板的程序在unix上运行没问题
which means you don't have f77 compiler.
a******s
发帖数: 232
25
来自主题: Computation版 - 老板的程序在unix上运行没问题
f77就是linux下面的g77,这是没有疑问的,当然如果你argue g77
是gnu fortran,和标准的fortran 77还有不同,那是自然的。
w**w
发帖数: 5391
s*r
发帖数: 2757
27
来自主题: Computation版 - Re: a question about fortran
f77有指针了?
s*r
发帖数: 2757
28
来自主题: Computation版 - Re: a question about fortran
可是f95有了叫指针的指针类似物
f77里不叫指针的指针怎么指到外面去?
h***o
发帖数: 539
29
来自主题: Computation版 - 关于文件输出,请教大家?
我家f77, g77和最挑剔的ifc都支持的呀
Ag
发帖数: 481
30
来自主题: Computation版 - who has paralle code for MD
try google PMEMD,
amber's sander is written in f77, hard to read
NAMD is written in C++, very complicated coding, which will drive you crazy.
PMEMD is f90 version of Amber's sander. According to some benchmarks, it's
the fastest. http://amber.scripps.edu/pmemd-get.html
x*****u
发帖数: 3419
31
来自主题: Computation版 - 请教大家c++ array
没错,同样的程序,我编了一个fortran的,
program Array
REAL A(2000,2000)
INTEGER i, j
do 100 i = 1,2000
DO 100 j = 1,2000
A(i,j) = 1.
100 continue
end
用同样的机器,同样的编译器(gnu gcc's f77),没有一点问题。

,告







有答
有。
t*****o
发帖数: 74
32
来自主题: Computation版 - a question about data transfer in MPI
FT, 居然还DD了, 一般, 大家都叫我 ‘德高望重’的老\同学....
在只有几行的情况下, 我一般用do ... end do
比较大的do loop还是用数字的. HOHO
好象不是所有的F77都支持do...end do, 不过比较新的编译器好象支持
h***o
发帖数: 539
33
来自主题: Computation版 - 关于adaptive grid size的问题
我倒是有办法,用链表来实现。哪个grid 附近需要增加网格,我就给
它加一串链表。不过f77里既没有动态分配也没有指针,所以实现
起来比较别扭。
h***o
发帖数: 539
34
来自主题: Computation版 - Fortran77支持递归(recursion)吗?
shit....不行....f77真土
h***o
发帖数: 539
35
来自主题: Computation版 - Fortran77支持递归(recursion)吗?
老板会分特的。
我还是用f77吧,用比较ugly的方法bypass这个recursion的问题
h***o
发帖数: 539
36
来自主题: Computation版 - 谁给说说fortran的几个标准
f77, f90, f95....这都有啥改进呀。
老板好象又对f90感兴趣了
x*****u
发帖数: 3419
37
来自主题: Computation版 - 谁给说说fortran的几个标准
I've heard of that f90 is not as efficient as f77. probably coz of the
compiler....
y**********a
发帖数: 16
38
来自主题: Computation版 - 关于C和Fortran: 一点儿个人观点
F77 can't, F90 can.
x*****u
发帖数: 3419
39
来自主题: Computation版 - 关于C和Fortran: 一点儿个人观点
Fortran 的最大问题是用的人越来越少。这跟几个因素有关。
1。F77简单好学,但是过旧,濒临淘汰;
2。F90更现代丰富,不那么简单好学,而要命的是,不免费,难以potable;
3。相比之下,C/C++虽显得更复杂(其实绝非难以掌握),但随之而来的是功能更加强大,
表现更加丰富,而更要命的是,完全免费!加上无比丰富的学习资源,不断涌现的各种li
brary(包括scientific computation),以及更活跃的编译器升级换代。。。。你多花几
个礼拜啃一啃C,面对你的将是整个世界。Fortran做计算是绝对胜任,但是你就被圈住在F
ormula Transformation,享受不到编程的真正快乐。
S***y
发帖数: 186
40
来自主题: Computation版 - fortran搞计算还是简单多了

Fortran的参数传递都是基于指针的,不过是implicitly,
你并不用自己去关心这事,compiler will do that for you.
当然,要是非得make it explicitly,F90 提供POINTER属性。
但我个人还是觉得,做科学计算没这个必要。
IMHO, F77 + Variable Matrix is perfect already!
g******s
发帖数: 733
41
来自主题: Computation版 - fortran90的超级怪问题
程序如下
PROGRAM MAIN
IMPLICIT NONE
real aa
aa=1023.0/2.0*1.0e-4
print*,aa
END PROGRAM
用f90 filename.f90 -o filename之后,filename出来的结果是0.051149997
用f77,把1023.0改成1021.0或1025.0,或者把*1.0e-4改成/1.0e4都对。
什么原因?先谢了!
g******s
发帖数: 733
42
来自主题: Computation版 - fortran90的超级怪问题
thanks a lot! But I don't know how to separate the compiling and link commands
. I use "f90 filename.f90 -o filename" which has put the compiling and link
together; or "f77 -c [-O4] filename.f" which doesn't recognize the switch "-r8
" or "-r16". What kind of compile and link commands shall I use if I want to
add the switch -r8 or -r16?

most
it
L*******g
发帖数: 913
43
给你发了个f77的。pdf文件太大没有发,你应该可以在网上找到。
j**u
发帖数: 6059
44
☆─────────────────────────────────────☆
neodreamer (aladdin) 于 (Fri Feb 2 17:11:48 2007) 提到:
rt
☆─────────────────────────────────────☆
jzxu (自然) 于 (Fri Feb 2 17:17:15 2007) 提到:

我相信computation版藏龙卧虎,呵呵。你有什么问题,说出来大家讨论讨论。
☆─────────────────────────────────────☆
neodreamer (aladdin) 于 (Fri Feb 2 17:35:31 2007) 提到:
系里的unix和linux都没有lapack
所以我想装一个自己用。
我先下载了blas然后用f77编译
然后ar成 libblas.a,
然后下载cblas,按照README编译
没问题。
我突然想到一个问题就是定义接口的那写头文件是放在哪里的?
是不是blas的函数名是按照标准固定的?
☆──────────────────────
b***e
发帖数: 38
45
来自主题: Computation版 - 计算版是新版?
If one can use f77 to develop a program that requires the features of C++,
he is really a big bull. OOP is very nice for developing a monster
computation program.
j**u
发帖数: 6059
46
☆─────────────────────────────────────☆
alligator (侏罗纪的幸存者) 于 (Fri Aug 10 13:37:00 2007) 提到:
把矩阵文件'aaa'读进来,方法1用隐式没有问题; 现在要用方法2挨个读进来,
正确的方法是什么?我的是错的....
parameter(max_row=10, max_col=10,n_row=3, n_col=3)
real mat(max_row, max_col), mat2(max_row, max_col)
! method 1:
open(1, file='aaa')
read (1,*) ((mat(i, j),j=1, n_col),i=1,n_row)
close(1)
!
! method 2 is wrong:
open(unit=2, file='aaa')
DO i = 1, n_row
DO j = 1, n_col
read(2, *) mat2(i, j)
E
w**p
发帖数: 69
47
现在都是用Notepad++看f77程序,很多comments都是用一个筐围起来的,但是
notepad++里显示那个筐总是乱七八糟
wordpad显示整齐,但是通篇黑白色,对关键词没有突出显示
希望能找到一个window下的editor,简单,显示清楚就行
多谢!
L*******g
发帖数: 913
48
来自主题: Computation版 - 请教Unix中怎么编译Fortun文件
f77 filename.for
./a.out
t****b
发帖数: 47
49
来自主题: Computation版 - 请教Unix中怎么编译Fortun文件
写一个fortran的程序,起名字,例如aaa.f
make aaa
即可,如果存在默认的fortran编译器,就能生成可执行文件aaa,可使用./aaa 的方式
执行只
fortran编译器通常可能是
f77、g77、gfortran、pgf77、pgf95、ifort等
j**f
发帖数: 7403
50
来自主题: Computation版 - 请教Unix中怎么编译Fortun文件
你这个,还需要一个MAKE文件。如果楼主不熟悉MAKE文件,那有的时间琢磨了。
想当年,俺拿了别人的样板MAKE文件,还很久弄不明白。就因为第二行要用TAB才行。
:)
还是F77, F90这样的简单编译器吧
首页 上页 1 2 (共2页)