Compiling Applications For Cray Systems

Binary Compatibility

When considering compiling an application program for use on Cray parallel-vector computer systems, one of the most important aspects is binary compatibility: which computer models can execute the same compiled code.

Instruction Set Classes

There are three basic instruction set classes for Cray systems: YMP, C90, and T90.

In addition, there are several binary-compatible variations on the YMP instruction set: J90, J90se, and SV1. These variations are more a matter of how the instructions are used to best utilize the machine hardware features than changes in the instruction set itself. However, the SV1 has sufficiently different features to distinguish itself from the other YMP-compatible systems that it is considered a unique machine type (technically speaking, it's a unique mainframe type, not a mainframe subtype of mainframe type CRAY-YMP) .

SV1e CPU modules, whether used with SV1 memory modules in a SV1e system or with SV1ex memory modules in a SV1ex system, are fully binary-compatible with SV1.

There are two non-binary-compatible versions of the T90 hardware, with essentially identical instruction sets: Cray floating point format and IEEE floating point format. Again, it is not the instruction set itself that is different, but in this case it is the floating point data format.

Executable Compatibility

Cray systems in use today can be roughly grouped two classes: YMP-compatible, and non-YMP compatible. YMP-compatible means that the system can execute programs compiled for a Cray YMP system.

Compiled For Target
Execute On SV1e SV1 J90se J90 YMP C90 T90 T90-IEEE
SV1e Yes Yes Yes Yes Yes - - -
SV1 Yes Yes Yes Yes Yes - - -
J90se - - Yes Yes Yes - - -
J90 - - - Yes Yes - - -
YMP - - Yes Yes Yes - - -
C90 - - Yes Yes Yes Yes - -
T90 - - - - - Yes Yes -
T90-IEEE - - - - - - - Yes
Table 1. Executable compatibility.

Selecting Targets For Application Porting

For optimum performance, an application must be compiled specifically for each computer model. However, it is often too much effort to create and support many different versions of an application, so more careful selection of target platforms is required. To fully support all these systems, six executables are necessary:

Cray ModelReason
SV1 to take advantage of SV1 and SV1e instructions
J90se to take advantage of J90se enhancements over J90
J90 to support J90 systems
T90 to support T90 systems
T90-IEEEto support T90-IEEE systems
C90 to support C90 systems
Table 2. Optimal Compilation Targets.

This list can be reduced to three by eliminating targets SV1, J90se, and C90. The J90 executable can be run on the eliminated models using these system's compatibility mode. This relationship is highlighted in blue in table 1.

A significant improvement in application performance can be gained by adding target SV1 to this list. The compiler has been optimized to use the SV1's enhancements in this mode.

There are several other varieties of YMP-compatible models, most of which are no longer in use: M90, EL, EL90, XMP/EA. This isn't a practical issue to worry about, since you're unlikely to run into them.

Cross-Compiling

By default, the compilers produce an executable for the the computer system used during compilation. It is possible to cross-compile for a different Cray system on another Cray system. However, to link the final executable, you need the system libraries for the target computer. Cross-linking libraries are not a standard part of the UNICOS or Programming Environment distributions.

Cross-compiling is selected through the TARGET environment variable. Set TARGET before starting the compile, or possibily on the "make" command line (make TARGET=xxx). There is a target(1) man page which explains this in more detail.

The minimal set of compilation targets to be able to execute on all Cray parallel-vector computers is:

Cray ModelTARGET SettingWill Run On
SV1*cray-sv1SV1e, SV1
J90cray-j90SV1e, SV1, C90, J90, J90se, YMP
T90cray-tsT90
T90-IEEEcray-ts,ieeeT90-IEEE
Table 3. TARGET environment variable settings.
* Recommended target for good performance on SV1 and SV1e systems, but not required.

References from the Cray Publications Library


Last updated Tue Jan 11 16:10:27 CST 2000 by Kevin Thomas.