- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem with lgamma function in f90
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
04-21-2004 02:48 AM
04-21-2004 02:48 AM
I have problems calling lgamma function from fortran 90. In the following example the returned value should be 0 (because lgamma(1) = 0), but it's not:
rcc:fit# cat test.f
double precision x, r
x = 1.0
write (*,*) lgamma(x)
end
rcc:fit# f90 -lm test.f
test.f
main program
6 Lines Compiled
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (test.o) was detected. The linked output may not run on a PA 1.x system.
rcc3:fit# ./a.out
1082562470
rcc:fit#
Does anyone has any ideas why?
best regards
Chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 03:02 AM
04-21-2004 03:02 AM
Re: problem with lgamma function in f90
My guess is that the linker is telling you that the builted binary is 64 bits and won't work on a 32 system.
Cheers,
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 03:12 AM
04-21-2004 03:12 AM
SolutionI just wrote a quickie C program and linked with -lm; the underlying lgamma function appears fine. It would be good to know if this is a problem with the write function (or perhaps the implicit format) or with the compiler itself. I would first assign the result of lgamma to your double precision variable, r. Write r using your existing format; if that fails use an explicit format and see if the results are any better. This will help separate out the "real" problem. You might want to stop the f90 compile at the assembly step and have a look at the .s source code.
It's always a good idea to look for cumulative compiler/linker/library patches but since you didn't bother to mention your version of compiler or HP-UX, I'm not going to bother looking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 03:14 AM
04-21-2004 03:14 AM
Re: problem with lgamma function in f90
http://h21007.www2.hp.com/dspp/tech/tech_TechSingleTipDetailPage_IDX/1,2366,399,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 06:43 AM
04-21-2004 06:43 AM
Re: problem with lgamma function in f90
!$HP$ ALIAS lgamma(%VAL)
double precision lgamma
double precision x, r
x = 1.0
write (*,*) lgamma(x)
x = 3.0
write (*,*) lgamma(x)
x = 3.06
write (*,*) lgamma(x)
end