Previous: Making the FITSIO Library
Up: Making the FITSIO Library
Next: The IRAF SPP Compatible Version of FITSIO
Previous Page: Making the FITSIO Library
Next Page: The IRAF SPP Compatible Version of FITSIO
The FITSIO package consists of about 20000 lines of Fortran source code contained in about 300 subroutines. The large majority of subroutines are written in strict Fortran-77 (except for the occasional use of INTEGER*2 variables) and are contained in the file fitsio.for. These subroutines can be compiled and run on any machine which supports Fortran-77. Note that the array bounds checking option available on some compiler must NOT be used when compiling FITSIO, since FITSIO uses some conventions that will cause erroneous reports of out of bounds array elements.
An additional small set of machine-specific subroutines is provided for the following computers (support for other machines may be added at a later date; please contact the author):
Machine Type Source Code Files ------------ ---------------- DEC VAX/VMS FITSVAX.FOR VMSIEEER.MAR VMSIEEED.MAR DEC Alpha/AXP OpenVMS FITSALPHAVMS.FOR DEC Ultrix: DECstations and FITSDEC.FOR Alpha/AXP running OSF/1 SUN workstations FITSSUN.FOR Silicon Graphics IRIS see FITSIRIS.DOC for details HP-UX 9000 see FITSHP.DOC for details NeXT computers see FITSNEXT.DOC for detailsIn addition, a version of FITSIO is available which runs in the IRAF environment and provides a set of SPP callable interface routines. For more information on this version, see the following section of this guide.IBM mainframes FITSIBM.FOR IBM AIX operating systems FITSAIX.FOR IBM PCs (and compatibles) - w/Microsoft Fortran FITSPC.FOR - w/Lahey fortran FITSLAHY.FOR Amiga FITSAMI.FOR Macintosh w/Absoft MacFortran II FITSMAC.F
A prototype C version of the FITSIO interface is also currently under development. Anyone interested in trying this version should contact the author for more details.
Both the machine-independent set of subroutines (in fitsio.for) and the appropriate set of machine-specific subroutines must be compiled and combined for use in linking application programs. In the VAX/VMS version there are also 2 assembly MACRO subroutines called vmsieeer.mar and vmsieeed.mar which must be included in the FITSIO library. A sample command file called 'makevms.com' is included in the FITSIO directory which can be used to create the FITSIO library on a VAX/VMS machine.
On some machines (e.g., Unix and PCs) it may be advantageous to compile each FITSIO subroutine separately before combining them into a library. This can significantly reduce the size of the final executable file since only the subroutines that are actually required will be linked into the code. The file 'Make.proto' is an example of a command file which can be used to build the FITSIO library on various Unix machines. Similarly, the 'makepc.for' file is a program which can be used to build a library on an IBM PC compatible machine. See the makepc.doc file for more details.
On some computers with limited memory it may be necessary to divide the FITSIO.FOR file into several smaller pieces before it can be successfully compiled (e.g., on some IBM PCs).