Sun/IRAF Site Manager's Guide

Sun/IRAF Site Manager's Guide

3.1. Multiple architecture support

Often the computing facilities at a site consist of a heterogeneous network of workstations and servers. These machines will often have quite different architectures. Considering only a single vendor like Sun, as of 1992 one sees the three major architectures SPARC, Motorola 68020, and Intel 80386, and several minor variations on these architectures, i.e., the floating point options for the Sun-3, namely the Motorola 68881 coprocessor, the Sun floating point accelerator (FPA), and software floating point (Sun is trying to phase some of these out but the need for multiple architecture support is not likely to go away).

Since IRAF is a large system it is undesirable to have to maintain a separate copy of IRAF for each machine architecture on a network. For this reason IRAF provides support for multiple architectures within a single copy of IRAF. To be accessible by multiple network clients, this central IRAF system will typically be NFS mounted on each client.

Multiple architecture support is implemented by separating the IRAF sources and binaries into different directory trees. The sources are architecture independent and hence sharable by machines of any architecture. All of the architecture dependence is concentrated into the binaries, which are collected together into the so-called BIN directories, one for each architecture. The BIN directory contains all the object files, object libraries, executables, and shared library images for an architecture, supporting both IRAF execution and software development for that architecture. A given system can support any number of BIN directories, and therefore any number of architectures.

In IRAF terminology, when we refer to an "architecture" what we really mean is a type of BIN. The correspondence between BINs and hardware architectures is not necessarily one-to-one, i.e., multiple BINs can exist for a single compiler architecture by compiling the system with different compilation flags, as different versions of the software, and so on. Examples of some currently supported software architectures are shown below.

Architecture	System	Description

f68881       	Sun-3	mc68020, 68881 floating point coprocessor
ffpa	        Sun-3	mc68020, Sun floating point accelerator board
generic	        any	no binaries
i386	        386i	Intel 80386, 80387 floating point coprocessor
pg	        any	compiled with -pg option for profiling
sparc    	Sun-4	Sun SPARC (RISC) architecture, integral fpu
ssun	        Sun-4	Sun SPARC architecture on systems running Solaris
sx86     	Intel	Intel F2C/GCC achitecture, for Solaris x86 platforms

Most of these correspond to hardware architectures or floating point hardware options. The exceptions are the generic architecture, which is what the distributed system is configured to by default (to avoid having any architecture dependent binary files mingled with the sources), and the "pg" architecture, which is not normally distributed to user sites, but is a good example of a custom software architecture used for software development.

When running IRAF on a system configured for multiple architectures, selection of the BIN (architecture) to be used is controlled by the UNIX environment variable IRAFARCH, e.g.,

% setenv IRAFARCH f68881
would cause IRAF to run using the f68881 architecture, corresponding to the BIN directory bin.f68881. Once inside the CL one can check the current architecture by entering one of the following commands (the output in each case is shown as well).
cl> show IRAFARCH
.f68881
or
cl> show arch

.f68881

If IRAFARCH is undefined at CL startup time a default architecture will be selected based on the current machine architecture, the available floating point hardware, and the available BINs. The IRAFARCH variable controls not only the architecture of the executables used to run IRAF, but the libraries used to link IRAF programs, when doing software development from within the IRAF or host environment.
Additional information on multiple architecture support is provided in the system notes file for V2.8 (when it was introduced), file doc$notes.v28.