avatar
Strange compiler error# Computation - 科学计算
b*n
1
I try to generate Gaussian distribution random numbers using gasdev() which
references ran1(). But the compiler I use (ifort) gives me the following
error:
/tmp/ifortWvLH4w.o: In function `randomn_.gasdev_':
random.f90:(.text+0x359): undefined reference to `ran1_'
random.f90:(.text+0x36b): undefined reference to `ran1_'
So strange.
I attached the code. It looks a little bit strange below.
PROGRAM RANDOMN
IMPLICIT NONE
INTEGER :: idu=-10
REAL :: random
print *, ran1(idu),ran1(idu)
idu=-
avatar
l*n
2
rand1没有

which

【在 b**n 的大作中提到】
: I try to generate Gaussian distribution random numbers using gasdev() which
: references ran1(). But the compiler I use (ifort) gives me the following
: error:
: /tmp/ifortWvLH4w.o: In function `randomn_.gasdev_':
: random.f90:(.text+0x359): undefined reference to `ran1_'
: random.f90:(.text+0x36b): undefined reference to `ran1_'
: So strange.
: I attached the code. It looks a little bit strange below.
: PROGRAM RANDOMN
: IMPLICIT NONE

avatar
b*n
3
找到错误了。呵呵。
原来这个程序是我直接从NR上抄来的,却编译通不过。原来是NR写错了。呵呵。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。