- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- 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
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
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-23-2012 06:54 PM
07-23-2012 06:54 PM
Re: Alpha to Integrity application porting - issue
Hi All,
Thank you so much for the wealth of information.
I have read them through all, and implemented a few suggestions as per your advice.
The correct prototyping has helped to resolve the float issue when float type (not double) arguments are passed
We have decided to do a database conversion, changing all g_float values to ieee float values.
One question I have left is, do I need to convert data of type float?
Eg,
float timer;
We seem to encounter problems reading float values (because we are only converting double variables).
We have converted our data files with double variables to ieee values, but did not convert the float variables.
The float variables read in from the legacy data files (which are in g_float) showed 0, or ome incorrect values.
Question is, is it necessary to convert float variables? If so, does the CVT$ calls support converting float values?
Thank you,
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2012 08:35 PM - edited 07-23-2012 08:42 PM
07-23-2012 08:35 PM - edited 07-23-2012 08:42 PM
Re: Alpha to Integrity application porting - issue
James,
I'd recommend converting everything to use IEEE types. Put the work in now, rather than spend time later trying to track down obscure bugs due to mismatches.
Regarding your "float timer", maybe you're using the RTL routine LIB$WAIT? It takes a floating point value in seconds. The default floating point is F_FLOAT for compatibility with the original VAX version. There's a new, optional 3rd argument to specify the floating point type. If you're finding that delay times using LIB$WAIT are incorrect, check the data types, and add a float-type argument to match.
See
$ HELP RTL LIB$ LIB$WAIT arguments
CVT$CONVERT_FLOAT can convert any floating point type to any other (including up and down precision, and even some non-OpenVMS types). You just specify the data type using the type code arguments for input and output
Size in
input_type_code Format Bytes
CVT$K_VAX_F F_Floating 4
CVT$K_VAX_D D_Floating 8
CVT$K_VAX_G G_Floating 8
CVT$K_VAX_H H_Floating 16
CVT$K_IEEE_S IEEE_S_Floating 4
CVT$K_IEEE_T IEEE_T_Floating 8
CVT$K_IEEE_X IEEE_X_Floating 16
CVT$K_IBM_LONG IBM_Long_Floating 8
CVT$K_IBM_SHORT IBM_Short_Floating 4
CVT$K_CRAY CRAY_Floating 8
Declarations for the input_type_code argument are in the $CVTDEF
module found in the system symbol libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2012 05:15 AM
07-24-2012 05:15 AM
Re: Alpha to Integrity application porting - issue
You want to convert both double and single precision in your data files. Doing just the doubles will get you IEEE T for doubles, but VAX F for floats. There is no qualifier on the compilers that allows that combination.
Yes, for your C application, you'll want to call CVT$CONVERT_FLOAT (it is documented in the LIB$ manual).
If you have all your data files, you can convert/update them (don't forget to make a backup first) or you could decide to convert on the fly when you read in the data.
Depending on the layout of your data and if you have the Fortran compiler, you could write a conversion program in Fortran. It has some support for doing automatic data conversion when reading/writing binary datafiles.
- « Previous
- Next »