- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Alpha to Integrity application porting - issue
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
Discussions
Discussions
Forums
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
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
тАО07-11-2012 03:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2012 03:54 AM
тАО07-12-2012 03:54 AM
Re: Alpha to Integrity application porting - issue
I think the moral is that it is easier to get your code to compile without warnings, than it is to work out what the consequences of not doing so are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2012 05:47 AM
тАО07-12-2012 05:47 AM
Re: Alpha to Integrity application porting - issue
It is documented in the language reference guide:
"Arguments to functions that have no prototype in scope are not converted to the types of the parameters. Instead, the expressions in the argument list are converted according to the following rules:
- Any arguments of type float are converted to double .
http://h71000.www7.hp.com/commercial/c/docs/6180profile_014.html#func_arg_convert_sec
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2012 09:51 AM
тАО07-12-2012 09:51 AM
Re: Alpha to Integrity application porting - issue
Hi All,
Thank you for helping in our issues. It helps to have so many expertise around.
To Richard and Steven, thank you, Your explanation provided the solution to Issue #2 regarding the float variable. By doing proper prototyping, the mystery is resolved. (We had prototype the function foo, but without the argument type).
We are still mystified with Issue #1.
Although we have compiled our application with /FLOAT=g_float, sometimes when computing on certain double variable (read from the file), it crashed. I have debugged and examine the value /binary, and it all shows zeroes. I think the FLTINV is triggered on the double field read from the file.
I reproduce my query below.
1) On certain occasion, the application will crash with SYSTEM-F-FLTINV, floating invalid operation.
For example, at the source line:
double my_double = 0;
my_double = 1st_common_double_field_read_from_file + 2nd_common_double_field_read_from_file;
Thank you,
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2012 10:02 AM
тАО07-12-2012 10:02 AM
Re: Alpha to Integrity application porting - issue
RE: FLTINV message
Per the definition/format of a G_Float number, the above message will likely appear if the sign bit is set and the exponent bits are zero(0). This would appear as 80000000 hex if you look at a register value and 00000080hex if in memory. This is per the Alpha arch reference pg 2-5.
I realize that this is on an I64 machine, but I believe that the same rules apply regarding the sign bit and exponent portion. Verify the bit layout with the debugger.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2012 10:09 AM
тАО07-12-2012 10:09 AM
Re: Alpha to Integrity application porting - issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2012 03:37 AM
тАО07-13-2012 03:37 AM
Re: Alpha to Integrity application porting - issue
>We had prototype the function foo, but without the argument type.
This is a K&R prototype, next to useless. It might be helpful if you port your application to C++ or C99, at least to get the strong type checking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2012 07:38 AM
тАО07-21-2012 07:38 AM
Re: Alpha to Integrity application porting - issue
As a side note, running the VMS debugger and doing DBG> SHOW SYMBOL/TYPE variable might have helped you pinpoint the problem quicker. Be aware that I did not test on your actual case. This is just a free advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2012 08:55 AM
тАО07-21-2012 08:55 AM
Re: Alpha to Integrity application porting - issue
About dealing with VAX Floats on Itanium, this document proves that it is always better to deal with IEEE floats if code performance is an issue. The document is viewable at :
http://vouters.dyndns.org/tima/OpenVMS-IA64-VAX-IEEE-floats-Performances_on_double_operations.html
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2012 11:57 AM
тАО07-23-2012 11:57 AM
Re: Alpha to Integrity application porting - issue
Note that Ph's analysis of D vs T is the worst case. D_FLOAT conversion is very ugly compared to G to T (and T to G). The layout of D float requires more code to detect various invalid floatings, NaNs, etc. The D-to-T routine is much more complicated (more instructions and more registers) than G-to-T. The S-to-F isn't a picnic either to handle all the edge conditions.
IEEE is much preferred on Itanium (which is why we changed the default) but if you have to use a VAX floating format, G would be my pick.