09-25-2008 03:42 PM
I'm porting a package written in Fortran from
Windows to HP IA-64. I got HP F90 v2.7.1 on
HP-UX B.11.22 U ia64.
In the package, there are lines like
rannum = rand() and
I was able to have those two lines on Windows,
but got problem complaining ld: Unsatisfied
symbol "seed_" while linking. (No error for
rand_ at all.) What library should I link?
(f90 -O2 +DD64 +U77 -o executable is my link
Any opinion is very appreciated.
Solved! Go to Solution.
09-25-2008 07:54 PM
spelled FORTRAN, but a quick Google search
fortran rand seed
found (among other things)
"The FORTRAN 77 Standard  does not address
the topic of random number generators. Nor is
there an industry standard. Most vendors
provide random number generators as an
extension to FORTRAN 77, but, without the
benefit of a standard, there is no agreement
between vendors on function names or calling
Sounds right to me, and suggests that you've
found some non-portable code.
On the other hand, Fortran 90 seems to offer
the intrinsic procedures RANDOM_NUMBER and
RANDOM_SEED. Perhaps a bit of code updating
is in order.
09-26-2008 07:18 AM
RAN, RAND, IRAND and SRAND should have carried forward form F77....