Cross-Platform Translation

hmreslib allows for cross -latform translation. This means that a binary file generated on a Cray may be translated on any of the supported machines. In a similar way, a binary file created on an SGI can be translated on any of the supported machines. While it may present a challenge, it is possible to write a translator which supports cross platform translation.

To assist in cross-platform translations, four functions are provided in hmreslib. The first, HMRES_agrumentcrossplatform(), must be called before HMRES_agrumentparse(). This function activates the reserved arguments associated with platform specification. In addition, it initializes the number conversion process. The other three functions provided are HMRES_readbinaryint(), HMRES_readbinaryint2, and HMRES_readbinaryfloat(). These subroutines read their respective data types from the file and convert the contents of the file to the correct data type on the machine where the translation is being performed.

It is recommended that only experienced programmers attempt cross-platform translation.