Binary Files (including Header Array files) On Windows PCs

The Lahey Fortran compiler LF95 is supported for use with Source-code GEMPACK from Release 7.0 (October 2000) or later. The Lahey compiler F77L3 is no longer supported from Release 8.0 of GEMPACK. The Lahey compiler LF90 is supported up to Release 10.0 of GEMPACK, but not after that.

The binary files (including Header Array files) produced by LF95 (or the Intel compilers) have a different internal structure from those produced by the Lahey compilers LF90 and F77L3.

Binary files produced by LF90 can be read by F77L3 programs and vice versa. However binary files produced by LF95 (or Intel) programs cannot be read directly by programs compiled and linked using LF90 or F77L3. Similarly, binary files produced by LF90 or F77L3 programs cannot be read directly by programs compiled and linked using LF95 or Intel.

However we supply with GEMPACK tools which allow you to convert binary files of one of these types to the other type (see below). Indeed it is not absolutely necessary to convert the files since Release 7.0 (or later) GEMPACK programs produced using any one of LF90, F77L3, LF95 or Intel are able to read any of these files because they first convert the file at run time if needed (see below).

First we need to settle on some terminology for discussing this issue.

We call binary files produced by programs compiled and linked using LF90 or F77L3 Lahey files.

We call binary files produced by programs compiled and linked using LF95 (or Intel) Fujitsu files (since LF95 is derived from a suite of Fortran compilers developed by the Fujitsu company).

Converting Between Lahey and Fujitsu Binary Files

The GEMPACK program CONLF can be used to convert a Lahey file to a Fujitsu one or vice versa. To convert a Lahey file to a Fujitsu one, select the program action CL (Convert Lahey). To convert a Fujitsu file to a Lahey one, select the program action CF (Convert Fujitsu).

The Windows program ConvHAR (written by Mark Horridge) can be used to indicate which files in a directory are Lahey files and which are Fujitsu files. It can also be used to convert all Lahey files to Fujitsu files, or vice versa. This program ConvHAR is available from the GEMPACK web site if you need to use it.

GEMPACK Release 7.0 Programs on PCs Can Handle Both Types of Files

Release 7.0 (or later) GEMPACK programs compiled and linked with any of LF90 , F77L3 or LF95 can usually handle either Lahey or Fujitsu files. They do this by making a converted version of any files of the wrong type at run time.

For example, suppose you have a Source-code version of GEMPACK and are using LF95. Suppose also that you are running the TABLO-generated program SJ.EXE you have produced (using LF95) and ask it to read a Lahey version of the base data file SJ.DAT. Your program SJ.EXE will recognise that this data file SJ.DAT is of the wrong type to be read directly and will convert the file to a Fujitsu file containing the same data. It will then read the Fujitsu version (and will ignore the Lahey version). Of course, the updated version of this data produced by the simulation will be a Fujitsu file (since it is an LF95 program running).

This ability of Release 7.0 (or later) GEMPACK programs means that you do not always have to convert binary files before using them. However if you have Lahey programs (produced via LF90 or F77L3) and you receive lots of Fujitsu files from a colleague, it is probably best to convert them (following one of the methods described above) before using them. Otherwise, your programs will continually be taking small amounts of time making copies of the data and will be leaving these temporary copies around to fill up your hard disk.

GEMPACK Release 6.0 Programs on PCs Cannot Read Fujitsu Files

Note however that Release 6.0 or earlier GEMPACK programs (these must have been compiled and linked using LF90 or F77L3) cannot read Fujitsu binary files. You must convert Fujitsu files to Lahey files if you wish to read them into Release 6.0 (or earlier) GEMPACK programs.

Recent Versions of ViewHAR Can Handle Both Types of Files

Recent versions of ViewHAR can read both types of files, and can save in either Lahey or Fujitsu format. See the ViewHAR Help file for more details.

See chapter 15 of GPD-4 for more details.

Go back to
GEMPACK FAQ Page