b**n 发帖数: 289 | 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=- |
l******n 发帖数: 9344 | 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
|
b**n 发帖数: 289 | 3 找到错误了。呵呵。
原来这个程序是我直接从NR上抄来的,却编译通不过。原来是NR写错了。呵呵。 |