Mainframe: A Fortran Interface to Hanna

Mainframe consists of two source files codes that provide an F77 interface to Hanna, so that you can write your usercode in Fortran instead of C. The interface is seamless: instead of writing your user functions as C modules, you write them as Fortran integer functions ... the argument lists and variable types are identical to those of the C version.

Codes

Usage

This section describes the few differences between regular hanna, and the F77 implementation provided by mainframe.

To repeat from above, mainframe_dummy.F provides an empty template for your user code. In particular, it sets all the return codes to 0 = 'success' ... hanna does pay attention to the return codes from your user functions.

The only major difference between mainframe and hanna is ...

User-defined command line arguments

Hanna provides the very nice ha_addarg routine that allows you to define new command-line arguments (or 'switches') for your usercode. This is a very convenient way of passing information to your program at runtime!

Mainframe allows you to do the same. However the syntax is a bit different from regular hanna. If you wish to declare your own command-line arguments (CLA):

Archive

For posterity, here is the old page describing F77 interfacing. This older version does not include a Fortran implementation of user-defined command line arguments.


N.C.R. Makins (makins@uiuc.edu)