- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to use (link) random number generator
Operating System - HP-UX
1820475
Members
3051
Online
109624
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2008 03:42 PM
тАО09-25-2008 03:42 PM
Hi there,
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
call seed(i_seed)
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
command.)
Any opinion is very appreciated.
KTC
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
call seed(i_seed)
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
command.)
Any opinion is very appreciated.
KTC
Solved! Go to Solution.
- Tags:
- f90
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2008 07:54 PM
тАО09-25-2008 07:54 PM
Re: how to use (link) random number generator
I haven't used Fortran seriously since it was
spelled FORTRAN, but a quick Google search
for:
fortran rand seed
found (among other things)
http://www.cisl.ucar.edu/zine/96/spring/articles/3.random-3.html
"The FORTRAN 77 Standard [4] 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
sequences."
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.
spelled FORTRAN, but a quick Google search
for:
fortran rand seed
found (among other things)
http://www.cisl.ucar.edu/zine/96/spring/articles/3.random-3.html
"The FORTRAN 77 Standard [4] 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
sequences."
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2008 07:18 AM
тАО09-26-2008 07:18 AM
Solution
see the fortran intrinsics in the manual...
RAN, RAND, IRAND and SRAND should have carried forward form F77....
http://docs.hp.com/en/B3908-90015/ch11s05.html#d0e66703
RAN, RAND, IRAND and SRAND should have carried forward form F77....
http://docs.hp.com/en/B3908-90015/ch11s05.html#d0e66703
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2008 09:21 AM
тАО09-26-2008 09:21 AM
Re: how to use (link) random number generator
Thanks for the responses. SRAND call is what I'm looking for.
The link to intrinsic function usage is also very much apprecited.
The link to intrinsic function usage is also very much apprecited.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP