0% found this document useful (0 votes)
35 views

Silicon Graphics and Cray Research Supercomputing Application Programming Interface

Setting up communication between Silicon Graphics and Cray Research supercomputers. 1997. This was the link that began the supercomputing and automated animation. CG like the movie Tron.

Uploaded by

horizonhb1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Silicon Graphics and Cray Research Supercomputing Application Programming Interface

Setting up communication between Silicon Graphics and Cray Research supercomputers. 1997. This was the link that began the supercomputing and automated animation. CG like the movie Tron.

Uploaded by

horizonhb1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 168

Silicon Graphics/Cray Research

Supercomputing Application
Programming Interface (API)
SN–2211 1.0
Copyright © 1997 Cray Research. All Rights Reserved. This manual or parts thereof may not be reproduced in any form unless
permitted by contract or by written permission of Cray Research.

Portions of this product may still be in development. The existence of those portions still in development is not a commitment of
actual release or support by Cray Research, Inc. Cray Research, Inc. assumes no liability for any damages resulting from attempts
to use any functionality or documentation not officially released and supported. If it is released, the final form and the time of
official release and start of support is at the discretion of Cray Research, Inc.

Autotasking, CF77, CRAY, Cray Ada, CraySoft, CRAY Y-MP, CRAY-1, CRInform, CRI/TurboKiva, HSX, LibSci, MPP Apprentice,
SSD, SUPERCLUSTER, UNICOS, and X-MP EA are federally registered trademarks and Because no workstation is an island, CCI,
CCMT, CF90, CFT, CFT2, CFT77, ConCurrent Maintenance Tools, COS, Cray Animation Theater, CRAY APP, CRAY C90,
CRAY C90D, Cray C++ Compiling System, CrayDoc, CRAY EL, CRAY J90, CRAY J90se, CrayLink, Cray NQS,
Cray/REELlibrarian, CRAY S-MP, CRAY SSD-T90, CRAY T90, CRAY T3D, CRAY T3E, CrayTutor, CRAY X-MP, CRAY XMS,
CRAY-2, CSIM, CVT, Delivering the power . . ., DGauss, Docview, EMDS, GigaRing, HEXAR, IOS,
ND Series Network Disk Array, Network Queuing Environment, Network Queuing Tools, OLNET, RQS, SEGLDR, SMARTE,
SUPERLINK, System Maintenance and Remote Testing Environment, Trusted UNICOS, UNICOS MAX, and UNICOS/mk are
trademarks of Cray Research, Inc.

CDC is a trademark of Control Data Systems, Inc. ETA is a trademark of ETA Systems, Inc. IBM is a trademark of International
Business Machines Corporation. IRIS, IRIX, SGI, Silicon Graphics, and Origin2000 are trademarks of Silicon Graphics, Inc. MIPS is
a trademark of MIPS Computer Systems. Motif is a trademark of the Open Software Foundation, Inc. NASTRAN is a trademark
of the National Aeronautics and Space Administration. PROCESS is a trademark of Simulation Sciences Inc.

The UNICOS operating system is derived from UNIX® System V. The UNICOS operating system is also based in part on the
Fourth Berkeley Software Distribution (BSD) under license from The Regents of the University of California.
Contents

Page

Preface ix
Related publications . . . . . . . . . . . . . . . . . . . . . . . ix
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . x

Summary [1] 1
Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
An evolving API . . . . . . . . . . . . . . . . . . . . . . . . 2
Relationship to other APIs . . . . . . . . . . . . . . . . . . . . . 2
Summary of the supercomputing API . . . . . . . . . . . . . . . . . . 3
Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
C and C++ . . . . . . . . . . . . . . . . . . . . . . . . . 5
Language libraries . . . . . . . . . . . . . . . . . . . . . . . 5
System calls and system libraries . . . . . . . . . . . . . . . . . . . 6
Parallel programming models . . . . . . . . . . . . . . . . . . . . 6
Document organization . . . . . . . . . . . . . . . . . . . . . . 7

Fortran [2] 9
Fortran language elements . . . . . . . . . . . . . . . . . . . . . 9
Common set of language extensions in the supercomputing API . . . . . . . . . 10
Source form and the character set in the supercomputing API . . . . . . . . . 10
Data objects and declarations included in the supercomputing API . . . . . . . 11
Storage association and initialization statements in the supercomputing API . . . . 12
Expressions and assignments in the supercomputing API . . . . . . . . . . 13
Boolean expressions in the supercomputing API . . . . . . . . . . . . . 13
Input/output extensions in the supercomputing API . . . . . . . . . . . . 14

SN–2211 1.0 i
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Page

Program units in the supercomputing API . . . . . . . . . . . . . . . 15


Execution control components in the supercomputing API . . . . . . . . . . 16
Cray Fortran extensions not included in supercomputing API . . . . . . . . . . 17
Common Cray and MIPSpro Fortran extensions not in the API . . . . . . . . . 17
Compiler directives . . . . . . . . . . . . . . . . . . . . . . . . 18
Directives included in the supercomputing API . . . . . . . . . . . . . . 19
Parallel directives in the supercomputing API . . . . . . . . . . . . . . 19
Common directives in the supercomputing API . . . . . . . . . . . . . 19
Cray Fortran directives not included in the supercomputing API . . . . . . . . . 20
General directives not included in the supercomputing API . . . . . . . . . . 20
Autotasking directives not included in the supercomputing API . . . . . . . . 22
Fortran intrinsic routines . . . . . . . . . . . . . . . . . . . . . . 23
Intrinsic routines in the supercomputing API . . . . . . . . . . . . . . . 24
Bitwise intrinsic routines included in the supercomputing API . . . . . . . . . 24
General intrinsic routines included in the supercomputing API . . . . . . . . . 25
System module included in the supercomputing API . . . . . . . . . . . . 26
Cray Fortran intrinsics not included in the supercomputing API . . . . . . . . . 26
Intrinsics to support IEEE arithmetic not in the supercomputing API . . . . . . . . 26
Miscellaneous intrinsics not included in the supercomputing API . . . . . . . . . 28
Intrinsics common to Cray Fortran and MIPSpro not in the supercomputing API . . . . 29
Double and complex double intrinsics not included in the supercomputing API . . . 29
General intrinsic routines not in the supercomputing API . . . . . . . . . . 30
Cray Fortran system module not included in the supercomputing API . . . . . . 31
Common system module not included in the supercomputing API . . . . . . . 31

C and C++ [3] 33


Language elements . . . . . . . . . . . . . . . . . . . . . . . . 33
Language extensions included in the supercomputing API . . . . . . . . . . . 33

ii SN–2211 1.0
Contents

Page

Cray C and C++ extension not included in the supercomputing API . . . . . . . . 34


#pragma directives . . . . . . . . . . . . . . . . . . . . . . . . 34
Directives included in the supercomputing API . . . . . . . . . . . . . . 35
Parallel directives in the supercomputing API . . . . . . . . . . . . . . 35
General directives included in the supercomputing API . . . . . . . . . . . 35
Cray Research C directives not included in the supercomputing API . . . . . . . . 36
Common directives not included in the supercomputing API . . . . . . . . . . 39
Built-in functions . . . . . . . . . . . . . . . . . . . . . . . . 39
Built-in functions included in the supercomputing API . . . . . . . . . . . . 40
Cray Research built-in functions not included in the supercomputing API . . . . . . 41
Built-in functions for all Cray Research systems . . . . . . . . . . . . . 41
Built-in functions only for Cray PVP systems . . . . . . . . . . . . . . 41
Built-in functions only for Cray MPP systems . . . . . . . . . . . . . . 42
Predefined macros . . . . . . . . . . . . . . . . . . . . . . . . 42
Predefined C and C++ macros included in the supercomputing API . . . . . . . . 43
Cray Research C macros not in the supercomputing API . . . . . . . . . . . 43
Host machine macro not included in the supercomputing API . . . . . . . . . 43
Target machine macros not included in the supercomputing API . . . . . . . . 43
Compiler information macros not included in the supercomputing API . . . . . . 44

Language Libraries [4] 45


General considerations . . . . . . . . . . . . . . . . . . . . . . . 45
Utilities or commands included in the supercomputing API . . . . . . . . . . 45
Cray Research commands not included in the supercomputing API . . . . . . . . 46
Fortran applications library . . . . . . . . . . . . . . . . . . . . . 46
Applications library routines in the supercomputing API . . . . . . . . . . . 46
Parallel runtime routines included in the supercomputing API . . . . . . . . . 47
Flexible file I/O (FFIO) layers included in the supercomputing API . . . . . . . 47

SN–2211 1.0 iii


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Page

PXF routines in the supercomputing API . . . . . . . . . . . . . . . 50


Fortran utility subroutines included in the supercomputing API . . . . . . . . 52
Foreign dataset conversion routines in the supercomputing API . . . . . . . . 52
Cray Fortran applications library extensions that are not in the supercomputing API . . . 53
Data conversion routines not in the supercomputing API . . . . . . . . . . 53
Tasking routines not included in the supercomputing API . . . . . . . . . . 56
I/O routines and packages not included in the supercomputing API . . . . . . . 57
Math routines not included in the supercomputing API . . . . . . . . . . . 58
Resource management routines not in the supercomputing API . . . . . . . . 58
Program analysis routines not included in the supercomputing API . . . . . . . 59
NAMELIST character manipulation routines not included in the supercomputing API . . 60
General routines not included in the supercomputing API . . . . . . . . . . 60
Common MIPSpro and Cray Fortran extensions not in the supercomputing API . . . . 62
Mathematical library . . . . . . . . . . . . . . . . . . . . . . . 63
Math routines included in the supercomputing API . . . . . . . . . . . . . 63
Cray mathematical routines not in the supercomputing API . . . . . . . . . . 65
Scientific libraries . . . . . . . . . . . . . . . . . . . . . . . . 66
Scientific library packages included in the supercomputing API . . . . . . . . . 66
Cray Research-specific packages not in the supercomputing API . . . . . . . . . 68
MPI library . . . . . . . . . . . . . . . . . . . . . . . . . . 70
PVM library . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Shared memory library . . . . . . . . . . . . . . . . . . . . . . 71
SHMEM routines included in the supercomputing API . . . . . . . . . . . . 71
PE query routines in the supercomputing API . . . . . . . . . . . . . . 71
Block data put routines in the supercomputing API . . . . . . . . . . . . 72
Block data get routines in the supercomputing API . . . . . . . . . . . . 73
Strided put routines in the supercomputing API . . . . . . . . . . . . . 74

iv SN–2211 1.0
Contents

Page

Strided get routines in the supercomputing API . . . . . . . . . . . . . 75


Point–to–point synchronization routines in the supercomputing API . . . . . . . 76
Barrier routines in the supercomputing API . . . . . . . . . . . . . . 76
Atomic memory fetch-and-operate routines in the supercomputing API . . . . . . 77
Reduction routines in the supercomputing API . . . . . . . . . . . . . 78
Cache management routines in the supercomputing API . . . . . . . . . . 80
Collective communication routines in the supercomputing API . . . . . . . . . 81
SHMEM routines not included in the supercomputing API . . . . . . . . . . . 82
Block data put routines not in the supercomputing API . . . . . . . . . . . . 82
Block data get routines not in the supercomputing API . . . . . . . . . . . . 82
Point–to–point synchronization routines not in the supercomputing API . . . . . . 83
Atomic memory fetch-and-operate routines not in the supercomputing API . . . . . 83

System and Library Calls [5] 85


Accounting, resource limits, and scheduling . . . . . . . . . . . . . . . . 89
UNICOS/mk and UNICOS calls that are being ported to the IRIX system and are not included
in the supercomputing API . . . . . . . . . . . . . . . . . . . . 89
UNICOS/mk and UNICOS calls that are not being ported to the IRIX system and are not
included in the supercomputing API . . . . . . . . . . . . . . . . . 91
File system and I/O . . . . . . . . . . . . . . . . . . . . . . . 91
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 92
Checkpoint and restart feature . . . . . . . . . . . . . . . . . . . . 93
UNICOS calls not included in the supercomputing API . . . . . . . . . . . . 93
Hardware interfaces . . . . . . . . . . . . . . . . . . . . . . . 93
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 93
Data migration . . . . . . . . . . . . . . . . . . . . . . . . . 94
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 94
Multilevel security . . . . . . . . . . . . . . . . . . . . . . . . 95
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 95

SN–2211 1.0 v
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Page

Math functions . . . . . . . . . . . . . . . . . . . . . . . . . 97
UNICOS/mk and UNICOS calls included in the supercomputing API . . . . . . . 97
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 98
Multithreaded process support . . . . . . . . . . . . . . . . . . . . 98
UNICOS calls not included in the supercomputing API . . . . . . . . . . . . 99
Networking routines . . . . . . . . . . . . . . . . . . . . . . . 100
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 100
Miscellaneous calls . . . . . . . . . . . . . . . . . . . . . . . . 101
UNICOS/mk and UNICOS calls that are being ported to the IRIX system and are included in
the supercomputing API . . . . . . . . . . . . . . . . . . . . . 101
UNICOS/mk and UNICOS calls that are being ported to the IRIX system and are not included
in the supercomputing API . . . . . . . . . . . . . . . . . . . . 101
UNICOS/mk and UNICOS calls not included in the supercomputing API . . . . . . 101
Individual system call differences . . . . . . . . . . . . . . . . . . . 105
UNICOS/mk and UNICOS differences . . . . . . . . . . . . . . . . . 105

Environment Variables [6] 109


Fortran environment variables . . . . . . . . . . . . . . . . . . . . 109
Environment variables included in the supercomputing API . . . . . . . . . . 109
Environment variables for parallel applications . . . . . . . . . . . . . 109
Miscellaneous environment variables in the supercomputing API . . . . . . . . 109
CF90 environment variables not included in the supercomputing API . . . . . . . 110
Parallel applications . . . . . . . . . . . . . . . . . . . . . . 110
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 110
C and C++ environment variables . . . . . . . . . . . . . . . . . . . 111
Cray Research C and C++ environment variables not included in the supercomputing API . 111

Interlanguage Communication [7] 113


Cray Research extensions in the supercomputing API . . . . . . . . . . . . . 113

vi SN–2211 1.0
Contents

Page

Index 115

Figures
Figure 1. The supercomputing API . . . . . . . . . . . . . . . . . . 4

SN–2211 1.0 vii


Preface

This publication documents the supercomputing application programming


interface (API) of Cray Research.
Online publications from Cray Research are available at the following web site:
http://swpubs-internal:8085/
http://www.cray.com/swpubs/

Related publications
The following Cray Research documents contain additional information that
may be helpful:
• CF90 Commands and Directives Reference Manual, publication SR–3901
• Fortran Language Reference Manual, Volume 1, publication SR–3902
• Fortran Language Reference Manual, Volume 2, publication SR–3903
• Fortran Language Reference Manual, Volume 3, publication SR–3905
• CF90 Ready Reference, publication SQ–3900
• Intrinsic Procedures Reference Manual, publication SR–2138
• Cray C/C++ Reference Manual, publication SR–2179
• Cray C/C++ Ready Reference, publication SQ–2180
• Application Programmer’s Library Reference Manual, publication SR–2165
• UNICOS/mk System Libraries Reference Manual, publication SR–2680
• Message Passing Toolkit: PVM Programmer’s Manual, publication SR–2196
• Message Passing Toolkit: MPI Programmer’s Manual, publication SR–2197
• Application Programmer’s I/O Guide, publication SG–2168
• UNICOS/mk System Calls Reference Manual, publication SR–2612
• Optimizing Code on Cray PVP Systems, publication SG–2192
• CRAY T3E Fortran Optimization Guide, publication SG–2518

SN–2211 1.0 ix
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

CRAY T3E C and C++ Optimization Guide, publication SG–2178


The following documents are from the MIPSpro programming environment:
• MIPSpro 7 Fortran 90 Commands and Directives Reference Manual, publication
SR–3907
• MIPSpro Fortran 90 Programmer’s Guide, SGI publication 008–2761–001
• MIPSpro POWER Fortran 90 Programmer’s Guide, SGI publication 008-2760-001
• MIPSpro Fortran 77 Language Reference Manual, 007-2362-003
• MIPSpro Fortran 77 Programmer’s Guide, SGI publication 007-2361-005
• MIPSpro Power Fortran 77 Programmer’s Guide, SGI publication 007-2363-002
• MIPSpro Compiling and Performance Tuning Guide, SGI publication
008-2479-001
• C Language Reference Manual, SGI publication 007–0701–100
• C++ Programming Guide, SGI publication 007–0704–110
• MIPSpro 64-bit Porting and Transition Guide, SGI publication 007-2391-004
• Performance Tuning Optimization for Origin2000 and Onyx2, SGI publication
007-3430-001

Conventions
The following conventions are used throughout this document:

Convention Meaning
command This fixed-space font denotes literal items such as
commands, files, routines, path names, signals,
messages, and programming language elements.
variable Italic typeface denotes variable information, such
as a user-supplied argument, and words or
concepts being define.
The following machine naming conventions may be used throughout this
document:

x SN–2211 1.0
Preface

Term Definition
Cray PVP systems All configurations of Cray parallel vector
processing (PVP) systems, including the
following:
CRAY J90 series
CRAY T90 series
Cray MPP systems All configurations of the CRAY T3E series
All Cray Research All configurations of Cray PVP systems, Cray
systems MPP systems, and Cray Origin systems currently
supported.

SN–2211 1.0 xi
Summary [1]

This document describes the supercomputing application programming


interface (API) for future Cray Research architectures. It defines elements of the
programming environment that are planned for the future. The environment
includes the compilers, language libraries, system libraries, environment
variables, system calls, and a few associated utilities. A future supercomputer
designed by the Cray Research subsidiary of Silicon Graphics will include all of
the elements in the supercomputing API that are described in this document,
plus other Silicon Graphics software.

1.1 Goals
The supercomputing API project has the following primary goal: to define the
set of language and library features that will be provided across
high-performance Cray Research and Silicon Graphics computer systems.
In achieving this goal, the project will also achieve some corollary results:
• Giving current Cray Research customers confidence that their application
investments will be protected as they move to new Cray Research and
Silicon Graphics systems and architectures.
• Providing guidance to application programmers on language and library
features that can be used for portable application development across the
Cray Research and Silicon Graphics product lines.
Note the limited focus of the primary goal of the supercomputing API: to define
the set of portable language and library features. Portable applications
development must take into account additional issues that are not covered in
this document, including:
• Data size differences
• Data format differences
• Makefile and other command differences
These are important topics, but the decision was made to focus this document
on portable language and library features, and to defer discussion and advice
on other portability topics to future publications from Silicon Graphics and
Cray Research.

SN–2211 1.0 1
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

1.2 An evolving API


The supercomputing API and this document should be viewed as an evolving
and living specification. It is laying out a roadmap for the future, while
maintaining important connections with the past. We fully expect that it will
take time to work out the details here, and we anticipate that changes will
result from several directions:
• Suggestions and comments from people reading or reviewing this document.
• Experiences from people developing portable applications across the Cray
Research and Silicon Graphics product line.
• Changes within the industry, such as the introduction of new standards seen
as important to high-performance, technical computing.
This document is maintained as an online document, and we anticipate that it
will be updated periodically by Cray Research; perhaps as often as once a
quarter. Version numbers and change bars will be used to identify changes.
Readers with comments on the supercomputing API or this publication can
send them via email to [email protected]. Please identify the specific document
version upon which you are commenting.

1.3 Relationship to other APIs


The supercomputing API will be implemented on high-performance Cray
Research and Silicon Graphics computer systems running UNICOS,
UNICOS/mk, and IRIX. Each of these systems has its own API, which has
evolved independently over many years. How does the supercomputing API
relate to these other APIs?
The supercomputing API is a subset of the other APIs. The supercomputing
API proposes a set of features that will be common on these systems. But this
proposal does not suggest or propose the removal of features from these APIs,
nor does it propose that these system-specific features not be carried forward to
follow-on systems. As has always been the case with Cray Research and Silicon
Graphics, such changes are rare, and when proposed, all efforts are made to
alert users and mitigate impacts.
The other APIs will continue to evolve. The supercomputing API has a focus
on portability, but the other APIs must meet other requirements, including
performance and functionality. As a result, programmers can expect to see the
other APIs continue to evolve over time, with new capabilities added and

2 SN–2211 1.0
Summary [1]

enhanced. In some cases, these capabilities will be added to the


supercomputing API as well; in others they will not.
The supercomputing API is not a simple intersection of the other APIs. The
supercomputing API was carefully thought through by engineers at Cray
Research. If you took the other APIs as they exist today, all the features that
they share in common would fall short of the supercomputing API. (Many of
the missing features are things that will be implemented and ported.) And at
the end of 1998, if you were to take the other APIs and identify all the common
features, you would find more features than are in the supercomputing API.
(The extra features are things that will be ported to ease application migration,
but they are superseded in the supercomputing API by better long-term
alternatives.)
As a specific example, the supercomputing API includes a proposal for a new
set of parallel programming directives and does not include Cray’s Autotasking
directives. The company believes these new directives will be best suited for
long-term application development. But in order to allow application
developers to move to these new directives in an orderly and convenient
manner, Cray’s Autotasking directives will be supported on IRIX systems for
the foreseeable future. Over time, though, users will be encouraged to use the
new directives for new applications and as they make major changes to existing
applications.

1.4 Summary of the supercomputing API


The supercomputing API defined in this document consists of numerous
language and library features that will allow an applications programmer to
write a single source code that will compile and run on current Cray Research
computer systems as well as on future Cray Research and Silicon Graphics
computer systems. The supercomputing API consists of the following
• A set of well understood and mature interfaces, already in use by many
applications running today on Cray Research computer systems.
• A few new interfaces that enhance portability among parallel architectures.
Adhering to the supercomputing API will not guarantee program portability
across the current Silicon Graphics/Cray Research product line, but it will make
it easier. The supercomputing API will answer questions like, “Will Cray
Fortran pointers be supported on MIPS systems?", or, "Which SHMEM
functions will work on both a CRAY T3E and on an Origin?" Truly portable
programming requires consideration of a number of other issues, such as
default data sizes, makefile compatibility, data formats, and file formats. Silicon

SN–2211 1.0 3
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Graphics and Cray Research engineers are investigating these other issues and
plan to make software changes, develop tools, and provide training and
documentation to help application developers deal with them.
For an illustration of how the supercomputing API relates to the previously
separate APIs of Cray Research and Silicon Graphics, see the following graphic:

IRIX API
Cray
extensions:
Other SGI features HPC standards: - FFIO
and standards: - SHMEM
- Fortran 90, C++, C
- Ada95 - MPI, PVM - FFTs
- Java - X/Open XPG4 - Language
- Graphics libraries - BLAS, LAPACK extensions

Obsolete:
High-end SGI - LINPACK
UNICOS API
extensions
Architecture-specific
- Vector math
Supercomputing API
a11346

Figure 1. The supercomputing API

This graphic shows the major components of the supercomputing API, which is
shown in yellow online and in light gray in the printed version. The largest
part of the supercomputing API consists of standards. The next largest piece
consists of Cray Research extensions. They are language and library features
that have been implemented over the years on Cray Research vector and MPP
systems. The final piece shown consists of high-end Silicon Graphics extensions.
In this document, only a few are listed, reflecting the initial emphasis.
The supercomputing API will be implemented in various stages during 1997
and 1998, on Cray Research UNICOS and UNICOS/mk systems and on Silicon
Graphics IRIX systems. Not all of the features will be available in the early
releases. The full API is planned to be implemented in its entirety on both sets

4 SN–2211 1.0
Summary [1]

of platforms by the end of 1998. As you will see, many of the features of the
supercomputing API are already available on both systems, especially those
defined by formal and de facto standards. The remaining features, though, will
take time to implement and release. This document does not lay out detailed
plans for the implementation of these features.
The following sections are a high-level summary of the supercomputing API.
Subsequent chapters present detailed information about each subject area (see
Section 1.5, page 7), highlighting specific language features and library
functions implemented in the current Cray Research and Silicon Graphics APIs
and identifying those that are carried forward to the supercomputing API.

1.4.1 Fortran
The Fortran language implemented in the supercomputing API primarily
consists of the ANSI and ISO standard language known as Fortran 90. The
Fortran 90 language, in turn, includes the full FORTRAN 77 language as a
subset.
Silicon Graphics Fortran, the supercomputing API Fortran language, includes
many of the extensions to the FORTRAN 77 language and intrinsic functions
that were initially implemented in the Cray Research FORTRAN 77 (CFT77)
compiler and carried forward in the Cray Research CF90 compiler.
The language also includes a set of common directives, primarily for shared
memory multiprocessing, and environment variables used to control and tune
multiprocessing applications.

1.4.2 C and C++


The C language implemented in the supercomputing API is primarily the
ANSI/ISO standard C language. The C++ language is based on the draft
proposed ANSI/ISO standard for C++.
The supercomputing API C and C++ languages include several Cray Research
language extensions, most notably restricted pointers and variable length
arrays. The common language also includes a variety of #pragma directives
associated with parallel processing, inlining, and template management.

1.4.3 Language libraries


The language libraries include a variety of libraries targeted at application
programmers:

SN–2211 1.0 5
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Fortran library The supercomputing API includes almost all the


routines in the Cray Research Fortran libraries.
This includes many layers of the flexible file I/O
(FFIO) feature and its associated assign(1)
command, parallel run-time routines, POSIX PXF
routines, and Fortran interfaces to POSIX threads.
Mathematical library The supercomputing API includes all the basic
functions found in the Cray Research libm, with
the exception of certain vector math routines, as
well as some Bessel and error functions from the
SGI libm.
Scientific library The supercomputing API includes the de facto
standard BLAS and LAPACK packages and FFT
routines. In addition, a wide variety of library
functions are planned for future releases,
including ScaLAPACK, convolution routines,
direct sparse solvers, and a sorting and searching
library, among others.
Message-passing The supercomputing API includes the MPI
libraries message-passing library; the PVM
message-passing library; and most of the SHMEM
library, as implemented on various Cray Research
systems.

1.4.4 System calls and system libraries


The supercomputing API includes UNIX system calls and system (that is, C)
libraries as defined by the XPG4 standard.

1.4.5 Parallel programming models


Parallel programming is a critically important part of the supercomputing API,
and specific models are covered in several sections of this document. This
section discusses these various models and their relationship to one another.
The supercomputing API includes the following:
• Shared memory, directive-based parallelism
• Distributed memory, message-passing libraries

6 SN–2211 1.0
Summary [1]

Both general approaches have strengths and weaknesses, and each is well suited
for particular current system architectures. Future systems from Cray Research
and Silicon Graphics will support both general approaches extremely well.
For the shared memory, directive-based approach, the supercomputing API
includes a proposal for a new set of parallel directives. This set of directives has
been recently developed with the involvement of several other key software
and system vendors. Both Cray Research and Silicon Graphics provide similar
sets of directives in current systems. Because the new directives are expected to
deliver comparable functionality and performance, these other sets of directives
are not included in the supercomputing API. (Although they will be carried
forward on both systems.)
Note: Due to nondisclosure agreements, this document cannot describe the
new parallel directives until the process of defining them is complete. They
will be described in a future update.
For the message-passing approach, the supercomputing API includes MPI, PVM,
and SHMEM. For new applications using message passing, it appears that MPI
is probably the best choice for application developers to consider, since it has
become widely accepted as the de facto standard, and good implementations
are available on a variety of systems. But MPI does not provide all the
capabilities of PVM, nor the capabilities and performance of SHMEM, and thus
PVM and SHMEM remain in the supercomputing API. As MPI and its
implementations evolve, this may change, but at this point, we believe it would
be premature to drop any of these from the supercomputing API.
Interoperability of the different approaches and models is another key goal.
Because the various models have different capabilities and performance profiles,
an application developer may not be able to settle on a single model as best for
all parts of an application. Interoperability of different models makes such a
limiting decision unnecessary.

1.5 Document organization


The remainder of the document is organized as follows:
• Fortran API (see Chapter 2, page 9).
• C and C++ API (see Chapter 3, page 33).
• Language and I/O libraries API (see Chapter 4, page 45).

• System calls and system libraries API (see Chapter 5, page 85).

SN–2211 1.0 7
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

• Environment variables (see Chapter 6, page 109).


• Interlanguage communication (see Chapter 7, page 113).
The organization within each chapter, except for this chapter, follows the
organization of the product. The C and C++ chapter, for instance, is divided
into the following sections:

• Extensions to the language standards.


• The #pragma directives.
• Builtin functions.
• Predefined macros.
• Various implementation-defined behaviors.
Within each section of a chapter, the organization is as follows:
• The set of elements that either is or will be part of the supercomputing API.
In many cases, the components of the supercomputing API have not been
implemented yet, and in some cases, they have not yet been scheduled.
• Cray Research components not included in the supercomputing API.
• In some cases, components that are common to MIPSpro Fortran and Cray
Research Fortran are listed separately. Sometimes these components are
included in the supercomputing API, and sometimes they are not.
Note: Some of the descriptions of components that are not in the
supercomputing API include references to equivalent components that are in
the supercomputing API. The references are provided to ease the process of
moving to the new software.
Hyperlinks for the online version and cross-references for the printed version
are provided in an effort to help ease navigation through the document.

8 SN–2211 1.0
Fortran [2]

This chapter defines the API for the Silicon Graphics Fortran compiler. It is
divided into the following sections:
• The standard Fortran language elements and extensions (see Section 2.1,
page 9).
• Compiler directives (see Section 2.2, page 18).
• Intrinsic routines (see Section 2.3, page 23.)
The term Silicon Graphics Fortran refers to the language that is part of the
supercomputing API. This language differs from the language accepted by the
MIPSpro F77 compiler.

2.1 Fortran language elements


The Fortran 90 language is defined by the following published standards:
• American National Standards Institute. American National Standard
Programming Language Fortran, ANSI X3.198–1992. New York, 1992.
• International Standards Organization. ISO/IEC 1539:1991–1, Information
technology — Programming languages — Fortran. Geneva, 1991.
Revisions to these standards, known as Fortran 95, will be adopted as the base
Fortran language in the future, when they replace Fortran 90.
This section defines the Cray Fortran extensions to the language, including
those extensions that are part of the supercomputing API. The chapter is
organized as follows:
• The set of language extensions that is part of the supercomputing API (see
Section 2.1.1, page 10).
• Cray Fortran extensions not included in the supercomputing API (see
Section 2.1.2, page 17),
• Extensions implemented on both Cray Fortran and MIPSpro Fortran but not
included in the supercomputing API (see Section 2.1.3, page 17).

SN–2211 1.0 9
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

2.1.1 Common set of language extensions in the supercomputing API


Language extensions to Silicon Graphics Fortran are organized as follows:
• Source form and character set (see Section 2.1.1.1, page 10).
• Data objects and declarations (see Section 2.1.1.2, page 11).
• Storage association and initialization statements (see Section 2.1.1.3, page 12).
• Expressions and assignments (see Section 2.1.1.4, page 13).
• Boolean expressions (see Section 2.1.1.5, page 13).
• Input/output (see Section 2.1.1.6, page 14).
• Program units (see Section 2.1.1.7, page 15).
• Execution control (see Section 2.1.1.8, page 16).

2.1.1.1 Source form and the character set in the supercomputing API
The following extensions apply to the form of the source and the character set:
$ and @ in identifiers Silicon Graphics Fortran allows the $ character
and the @ character in identifiers. The @ character
cannot be used as the first character in an
identifier. Using the @ character is not
recommended; MIPSpro reserves it for internal
use.
Compiler directives Silicon Graphics Fortran allows a compiler
directive sentinel beginning with the character C
in column 1 of fixed source form to indicate a
compiler directive. In addition, Silicon Graphics
Fortran allows a compiler sentinel beginning with
the ! character, either in column 1 of a fixed
source form line or as the first nonblank
characters of a free source form line. Compiler
directives appear as comments to other compilers.
Continuation lines Silicon Graphics Fortran allows 99 continuation
lines in fixed or free source form. (The Fortran 90
standard limits continuation lines to 19 in fixed
form and 39 in free source form.)
END Silicon Graphics Fortran allows an END statement
to be continued on subsequent lines.

10 SN–2211 1.0
Fortran [2]

Fixed form line length Silicon Graphics Fortran allows fixed source lines
of 72 characters by default. A command-line
option extends the source line from 72 to 80 or
132 characters. (The Fortran 90 standard restricts
fixed source form lines to 72 characters.)
Characters following column 72, 80, or 132 are
ignored.
Tab character Silicon Graphics Fortran allows the tab character
in both free and fixed forms. In fixed form, if a
tab is the first character on a line, the next
character determines how the line is interpreted.
A nonzero digit indicates a continuation line;
otherwise, the line is the initial line of a
statement.In free form, a tab character is treated
as a single blank character.

2.1.1.2 Data objects and declarations included in the supercomputing API


The following Silicon Graphics Fortran extensions apply to data types and
constants:
AUTOMATIC attribute Silicon Graphics Fortran allows dynamic
variables to be declared in an AUTOMATIC
statement or given the AUTOMATIC attribute in
the list form of a type declaration.
Binary, octal, and Silicon Graphics Fortran allows the following
hexadecimal constants binary, octal, and hexadecimal (BOZ) constants in
places other than DATA statements: B’bbb’,
O’ooo’, Z’zzz’, B"bbb", O"ooo", and Z"zzz".
These constants are typeless; no type conversion
takes place when they are assigned to a
floating-point variable or when they are used in a
floating-point expression.
Boolean constants Silicon Graphics Fortran allows the following
Boolean (typeless) constants: ddddddB, an octal
constant where d is an octal digit and X’ddd’, a
hexadecimal constant where d is a hexadecimal
digit.
Character constant use Silicon Graphics Fortran allows a character
constant to be used in a context in which character
constants usually are not allowed, but in which a

SN–2211 1.0 11
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Hollerith constant is allowed. Hollerith constants


are allowed in arithmetic and logical expressions
and in assignment statements where the left side
of the equal sign is an entity of a numeric type.
Complex literal Silicon Graphics Fortran allows the use of named
constant constants as the real or imaginary components of
a complex literal constant.
Cray pointers Silicon Graphics Fortran supports Cray pointer
and Cray character pointer types, as well as the
LOC and CLOC functions, which return the
address of its argument. Note, however, that
there is a difference in pointer arithmetic on
various systems. Pointer arithmetic is in default
numeric storage units on Cray PVP and Cray
MPP systems and in bytes on MIPSpro platforms.
Hollerith constants Silicon Graphics Fortran allows the following
Hollerith constants: nH... , nL... , nR... , ’...’H,
’...’L, ’...’R, "..."H, "..."L, and "..."R.
Redeclaration of Variables can be declared more than once in a
variables program unit if the redeclaration confirms or
adds attributes from previous declarations.
Type *size data The type and byte-count form of data declaration
declarations is supported as an alternative form of specifying
type precision. Storage association differs among
platforms for *1, *2, and *4 types. Some
compiler options may treat * types differently
than KIND types. Values for size are the same as
for KIND types, except for complex data.

2.1.1.3 Storage association and initialization statements in the supercomputing API


The following Silicon Graphics Fortran extensions apply to storage association
and initialization statements:
Common blocks with Silicon Graphics Fortran allows the specification
the same name of common blocks with the same name to be
different sizes. (Fortran 90 requires the size of
named common blocks with the same name to be
the same size in all scoping units of the
executable program.)

12 SN–2211 1.0
Fortran [2]

Multiple common block Silicon Graphics Fortran permits a named


declarations common block to appear in multiple block data
program units.
Equivalencing Silicon Graphics Fortran allows character and
noncharacter data objects to be equivalenced.
Initialization Common blocks can be initialized in multiple
program units and in units other than BLOCKDATA
subprograms. Silicon Graphics Fortran allows a
numeric data object to be initialized with
character values in a DATA statement.
SAVE statement Silicon Graphics Fortran allows more than one
SAVE statement in a scoping unit when a SAVE
statement without an entity list appears.

2.1.1.4 Expressions and assignments in the supercomputing API


The following Silicon Graphics Fortran extensions apply to expressions and
assignments:
Array reference

Silicon Graphics Fortran allows an array reference with fewer


subscript expressions than the rank of the array. The lower
bound is assumed for each missing subscript.
Restricted expressions

Silicon Graphics Fortran allows a primary restricted expression


to be a reference to an external function whose result is a
non-pointer scalar intrinsic type.

2.1.1.5 Boolean expressions in the supercomputing API


The following Silicon Graphics Fortran extensions apply to Boolean expressions:
Boolean masking Cray and MIPSpro Fortran allow masking
expressions expressions in which a logical operator operates
on bits within an integer, real, Cray pointer, or
Boolean value and generates an integer result
type in MIPSpro Fortran and a Boolean result
type in Cray Fortran. In addition, the .XOR.
operator is a masking operator that provides the
bitwise “exclusive or” operation.

SN–2211 1.0 13
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Expressions and Silicon Graphics Fortran allows the logical


assignments operators .AND., .OR., .NOT., .EQV., and
.NEQV. to be used with operands of type real
and integer, as well as logical.
If the operands are of type real or integer, the
operators perform a bitwise AND, OR, NOT, or XOR
operation on the operands. An additional
operator, .XOR., is provided that performs the
bitwise XOR operation.
On Cray PVP and Cray MPP systems, the bitwise
operators produce a typeless or Boolean result. If
the result of a bitwise operator is part of a
floating-point expression, the typeless result is not
converted to real. That is, the result from the
bitwise operation is used or assigned without any
implicit conversion.
On IRIX systems, the bitwise operators produce
an integer result. If the result of a bitwise
operator is part of a floating-point expression or
is assigned to a floating-point variable, the integer
result is converted to real.

2.1.1.6 Input/output extensions in the supercomputing API


The following Silicon Graphics Fortran extensions apply to input/output
statements and FORMAT statements.
Assumed-size array Silicon Graphics Fortran allows an internal file to
be an assumed-size array.
B, O, and Z edit Silicon Graphics Fortran allows a sign as part of
descriptors the input string for B, O, and Z edit descriptors.
The Fortran 90 standard allows only binary, octal,
or hexadecimal digits and blanks as input. Silicon
Graphics Fortran also allows a negative number
for the B, O, and Z output edit descriptors.
Fortran 90 only allows an unsigned value.
BUFFER IN, BUFFER Silicon Graphics Fortran allows the BUFFER IN
OUT and BUFFER OUT asynchronous, unformatted
I/O statements. The Fortran 90 standard does not
recognize the asynchronous I/O feature.

14 SN–2211 1.0
Fortran [2]

D edit descriptor Silicon Graphics Fortran allows the Dw.dEe form


of edit descriptor D.
End-of-file Silicon Graphics Fortran allows writing past an
end-of-file record.
Format identifier Silicon Graphics Fortran allows a format identifier
on an I/O statement to be the name of an array
of type integer, real, or logical.
Formatted and Silicon Graphics Fortran permits formatted and
unformatted records unformatted records to be mixed in a file.
Formatting list Silicon Graphics Fortran requires commas in a
format list only between two adjacent digits
belonging to different list items; between two
adjacent quotes or apostrophes of separate edit
descriptors; and after a D, E, or G descriptor that
precedes an E descriptor. (Fortran 90 only allows
the comma to be optional in the following cases:
before or after a slash or colon descriptor and
immediately following an F, E, D, or G edit
descriptor.)
I/O list Silicon Graphics Fortran allows the execution of
another I/O statement on any other unit through
a function reference in an I/O list.
List-directed input Silicon Graphics Fortran allows binary, octal, and
hexadecimal values in a list-directed input record.
Parentheses Silicon Graphics Fortran allows empty
parentheses groups in a format descriptor.
Unit specifier missing Silicon Graphics Fortran allows a WRITE
with WRITE statement with no unit specifier. (The syntax for a
WRITE statement can be like that of the PRINT
statement.)

2.1.1.7 Program units in the supercomputing API


The following Silicon Graphics Fortran extensions apply to program units:
BLOCK DATA units Silicon Graphics Fortran allows up to 26
unnamed BLOCK DATA program units in an
executable program. Fortran 90 allows only one
such program unit.

SN–2211 1.0 15
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

PROGRAM statement Silicon Graphics Fortran allows a sequence of


characters following the program name in a
PROGRAM statement. Characters following the
name are ignored.
PURE and ELEMENTAL The PURE and ELEMENTAL keywords are Fortran
95 features supported by Silicon Graphics Fortran.
RESULT variable Silicon Graphics Fortran allows the function name
specifier to be used for recursive function calls and to
reference the function result variable when the
function result is scalar and of type real, logical,
integer, double precision, or complex. Fortran 90
uses the RESULT specifier to reference the
function result variable in a recursive function.
%VAL intrinsic The %VAL intrinsic is allowed in an actual
argument list to indicate that a scalar argument is
to be passed by value.

2.1.1.8 Execution control components in the supercomputing API


The following components of the supercomputing API relate to execution
control:
Extended range DO Silicon Graphics Fortran allows transfer of control
into a DO or IF block. This allows for extended
range DO loops.
Implied DO variable Silicon Graphics Fortran allows the name of an
implied DO variable to be the same as the name of
a nonscalar object. The Fortran standard requires
the name of an implied DO variable to have the
same name as a scalar object.
Stop-code type Silicon Graphics Fortran STOP statement and
PAUSE statement arguments allow the stop-code to
be an unsigned integer, a character constant (with
a maximum of 80 characters), a character
variable, a character array element, or a character

16 SN–2211 1.0
Fortran [2]

function. (Fortran 90 requires the stop-code to be a


scalar-char-constant of 1 to 5 digits.)

2.1.2 Cray Fortran extensions not included in supercomputing API


The Cray Fortran compiler supports the following extensions that are not part
of the supercomputing API:
Single-iteration DO loop Cray Research Fortran supports a command-line
option for a minimum 1–iteration DO loop.
TASKCOMMON Cray Fortran allows the TASKCOMMON statement
everywhere except in modules, contained
procedures, and interface blocks.
Unit identifier Cray Fortran allows a character literal constant
containing an external name to be used as an I/O
unit.

2.1.3 Common Cray and MIPSpro Fortran extensions not in the API
This section defines extensions that are currently supported by both the Cray
Fortran and MIPSpro compilers but are not part of the supercomputing API:
LOGICAL constant Cray and MIPSpro Fortran allow .T. and .F. as
abbreviations alternate forms for logical constants .TRUE. and
.FALSE., respectively, but only if neither .T.
nor .F. been defined as a defined-operator.
Additional logical and Cray and MIPSpro Fortran allow .N., .A., .O.,
masking operators and .X. operators as alternative forms for
.NOT., .AND., .OR., and .XOR. when these
forms have not been defined as a defined-operator.
Comma placement Cray and MIPSpro Fortran allow a comma to
precede a right parenthesis in a format descriptor.
Common block The Fortran 90 standard specifies that a variable
variables in a named common block retains its value
(remains defined) only if the common block also
appears in at least one other scoping unit that is
making either a direct or indirect reference to the
current subprogram. The MIPSpro Fortran
compiler retains the value regardless of whether
the common block also appears in any other

SN–2211 1.0 17
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

currently active scoping unit. MIPSpro Fortran


does not enforce the requirement that a named
common block must appear in a SAVE statement
in each scoping unit in which it appears, if it is in
a SAVE statement in any scoping unit.
DOUBLE COMPLEX Cray and MIPSpro Fortran allow the
DOUBLE COMPLEX statement. Use the KIND type
specifiers.
* edit descriptor Cray and MIPSpro Fortran allow the asterisk (*)
descriptor to delimit character strings in a format.
$ edit descriptor Cray and MIPSpro Fortran allow the $ edit
descriptor.
Rw edit descriptor Cray and MIPSpro Fortran allow the Rw edit
descriptor.
ENCODE, DECODE Cray and MIPSpro Fortran allow the ENCODE and
DECODE I/O statements. Use internal files as the
preferred replacement.
NAMELIST statements Cray and MIPSpro Fortran allow NAMELIST
statements to be mixed in with executable
statements. All references to the NAMELIST group
name must follow all definitions of the
NAMELIST group name.
Parentheses in I/O Cray and MIPSpro Fortran support redundant
statements parentheses in I/O statements.
Partial array Cray and MIPSpro Fortran let you supply fewer
initialization values than targets in a DATA statement as long
as the last item in the target list is an array name.
Repeat count Cray and MIPSpro Fortran allow a repeat count
before the slash (/) edit descriptor. (Fortran 90
classifies the / edit descriptor as non-repeatable.)

2.2 Compiler directives


The following sections define the common directives and the Cray Fortran
extensions to the common set of compiler directives:
• Directives included in the supercomputing API (see Section 2.2.1, page 19).

18 SN–2211 1.0
Fortran [2]

• Cray Fortran directives not included in the supercomputing API (see Section
2.2.2, page 20).

2.2.1 Directives included in the supercomputing API


The following directives either are already or are planned to be included in the
supercomputing API.
• Parallel directives in the supercomputing API (see Section 2.2.1.1, page 19).
• Common directives in the supercomputing API (see Section 2.2.1.2, page 19).

2.2.1.1 Parallel directives in the supercomputing API


Note: Due to nondisclosure agreements, this document cannot describe the
new parallel directives until the process of defining them is complete. They
will be described in a future update.

2.2.1.2 Common directives in the supercomputing API


The following directives are common to Cray Fortran and MIPSpro and are part
of the supercomputing API:
CNCALL Allows Autotasking for a loop by asserting that
subroutines called from the loop have no loop
related side effects.
EJECT Breaks to a new page in listings.
FREE and FIXED Specifies a source form for the program unit.
ID Allows storage of a string in an object file.
IVDEP Ignores dependencies in the following loop.
LIST and NOLIST Toggles listings on and off.
NAME Used for interlanguage communication. Allows a
C-style name to be called from a Fortran program
by associating the C-style name with a Fortran
name.

SN–2211 1.0 19
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

PERMUTATION Declares that an integer array has no repeated


values.

2.2.2 Cray Fortran directives not included in the supercomputing API


This section lists the Cray Fortran directives that are not part of the
supercomputing API. The section is organized as follows:
• General directives (see Section 2.2.2.1, page 20).
• Autotasking directives (see Section 2.2.2.2, page 22).

2.2.2.1 General directives not included in the supercomputing API


This section lists the Cray Research general directives that are not part of the
supercomputing API:
ALIGN Aligns the next instruction at an instruction page
boundary. Used to help place small loops within
the same page. (Cray PVP systems only)
BL and NOBL Toggles bottom loading between standard bottom
loading (BL) and safe bottom loading (NOBL).
(Cray PVP and CRAY T3E systems only)
BOUNDS and NOBOUNDS Toggles bounds checking.
CACHE_ALIGN Aligns specified variables on a cache line
boundary. (CRAY T3E systems only)
CACHE_BYPASS Asserts that references to the specified variables
will not benefit by the use of cache. (Cray MPP
systems only)
CASE and END_CASE Separates adjacent code blocks that can be
executed concurrently. (Cray PVP systems only)
COMMON Indicates that the specified block is a common
block. Overrides -a taskcommon.
CONCURRENT Defines the threshold at which pipelining
[SAFE_DISTANCE=n] becomes profitable. (CRAY T3E systems only)
COPY_ASSUMED_SHAPE Copies assumed-shape dummy arguments to
temps to aid loop optimization.
FLOW and NOFLOW Toggles flow tracing. (Cray PVP systems only)

20 SN–2211 1.0
Fortran [2]

INLINE and NOINLINE Toggles inlining. (Cray PVP and CRAY T3E
systems only)
INLINE ALWAYS Forces attempted inlining of specified procedures.
(Cray PVP and CRAY T3E systems only)
INLINE NEVER Suppresses attempted inlining of specified
procedures. (Cray PVP systems only)
INTEGER Specifies a default integer size for the program
unit.
MODINLINE and Tells the compiler to write out information about
NOMODINLINE the module procedures so that when the module
is used later, the module procedures can be
inlined. (Cray PVP and CRAY T3E systems only)
NEXTSCALAR Disables vectorization for the next loop. (Cray
PVP and CRAY T3E systems only)
NOINTERCHANGE Inhibits loop interchange on next loop nest.
NOSIDEEFFECTS Specifies that the procedure has no side effects.
(Cray PVP systems only)
PATTERN and Toggles pattern matching on and off.
NOPATTERN
PREFERTASK Indicates that the next loop should be considered
for Autotasking or marks an inner loop to be
tasked instead so that loops are interchanged.
(Cray PVP systems only)
PREFERVECTOR Indicates that the next loop should be considered
for vectorization. (Cray PVP systems only)
RECURRENCE and Toggles vectorization for reduction loops.
NORECURRENCE
SHORTLOOP Identifies the next loop as a short loop. Iterations
are less than or equal to the vector length of 64.
(Cray PVP systems only)
SHORTLOOP128 Identifies the next loop as a short loop. Iterations
are less than or equal to 128. (Cray PVP systems
only)
SPLIT and NOSPLIT Splits or does not split the following loop to take
advantage of the stream buffers on a CRAY T3E

SN–2211 1.0 21
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

system. This is not a toggle. (CRAY T3E systems


only)
STACK Specifies that storage for objects defaults to
STACK.
SUPPRESS Suppresses scalar optimization by storing
variables in registers to memory.
SYMMETRIC Declares that a PE-private stack variable has the
same local address on all PEs. (CRAY T3E
systems only)
TASK and NOTASK Toggles tasking on and off. (Cray PVP systems
only)
UNROLL and NOUNROLL Specifies loop unrolling.
USES_EREGS Directs a subroutine to use E-registers through
user-programmed, memory mapped operations.
The compiler should not use E-registers for local
memory optimizations. (CRAY T3E systems only)
VECTOR and NOVECTOR Toggles vectorization of loops.
VFUNCTION Declares that a vector version of a function exists.
(Cray PVP systems only)
VSEARCH and Toggles vectorization of search loops. (CRAY T3E
NOVSEARCH systems only)

2.2.2.2 Autotasking directives not included in the supercomputing API


This section lists the Cray Research Autotasking directives that are not part of
the supercomputing API. These directives are available only on Cray PVP
systems. Most of them will be replaced by a new set of parallel directives
currently being defined.
Note: Due to nondisclosure agreements, this document cannot describe the
new parallel directives until the process of defining them is complete. They
will be described in a future update.
!MIC$ CASE and
!MIC$ END CASE
The !MIC$ CASE directive serves as a separator
between adjacent code blocks that can be
executed concurrently. !MIC$ END CASE serves

22 SN–2211 1.0
Fortran [2]

as the terminator for a group of one or more


parallel CASE directives.
!MIC$ CNCALL Allows a loop to be autotasked by asserting that
subroutines called from the loop have no
loop-related side effects (that is, they do not
modify data referenced in other iterations of the
loop) and therefore can be called concurrently by
separate iterations of the loop.
!MIC$ DO ALL Indicates that the DO loop beginning on the next
line may be executed in parallel by multiple
processors.
!MIC$ DO PARALLEL Indicates that the DO loop beginning on the next
and !MIC$ END DO line can be executed in parallel by multiple
processors. The !MIC$ END DO directive extends
a control structure beyond the DO loop. Without a
!MIC$ END DO directive, all of the CPUs will
synchronize immediately after the loop, so that
no processors can continue executing until all of
the iterations are done..
!MIC$ GUARD and Delimit a critical region, providing the necessary
!MIC$ END GUARD synchronization to protect or guard the code
inside the critical region.
!MIC$ MAXCPUS Controls the number of CPUs allocated to a
parallel region of code.
!MIC$ NUMCPUS Allows you to control the number of CPUs
allocated to all subsequent parallel regions.
!MIC$ PARALLEL and Marks, respectively, the beginning and end of a
!MIC$ END PARALLEL parallel region.
!MIC$ PERMUTATION Indicates that an array from which values are to
be assigned has no repeated values.

2.3 Fortran intrinsic routines


This section is organized as follows:
• Intrinsic procedures in the supercomputing API (see Section 2.3.1, page 24).

SN–2211 1.0 23
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

• Cray Fortran intrinsic procedures that are not included in the


supercomputing API (see Section 2.3.2, page 26).
• Intrinsics common to Cray Fortran and MIPSpro that are not in the
supercomputing API (see Section 2.3.5, page 29).

2.3.1 Intrinsic routines in the supercomputing API


This section describes the supercomputing API, which includes intrinsic
procedures and system modules that are extensions to the standard.
• Bitwise intrinsic routines included in the supercomputing API (see Section
2.3.1.1, page 24).
• General intrinsics included in the supercomputing API (see Section 2.3.1.2,
page 25).
• System module for POSIX system calls included in the supercomputing API
(see Section 2.3.1.3, page 26).

2.3.1.1 Bitwise intrinsic routines included in the supercomputing API


On Cray PVP and Cray MPP systems, the bitwise intrinsic functions return a
typeless or Boolean result. If the result of a bitwise intrinsic function is part of a
floating-point expression, the typeless result is not converted to real. That is,
the result from the bitwise intrinsic function is used or assigned without any
implicit conversion.
On IRIX systems, the bitwise intrinsic functions return an integer result. If the
result of a bitwise intrinsic function is part of a floating-point expression or is
assigned to a floating-point variable, the integer result is converted to real.
AND Performs a bitwise AND operation.
COMPL Performs a bitwise complement.
DSHIFTL Performs a left shift that is the size of a default
double precision object.
DSHIFTR Performs a right shift that is the size of a default
double precision object.
EQV Performs a bitwise logical equivalence.
MASK Returns a bit mask of ones.
NEQV Performs a bitwise logical difference.

24 SN–2211 1.0
Fortran [2]

OR Performs a bitwise OR operation.


SHIFTL Performs a bitwise shift to the left.
SHIFTA Performs a sign-extended shift.
SHIFTR Performs a bitwise shift to the right.
XOR Performs a logical exclusive OR operation.

2.3.1.2 General intrinsic routines included in the supercomputing API


The following general intrinsics are Cray Fortran extensions that are also
supported by MIPSpro Fortran. They are part of the supercomputing API:
COT Returns a cotangent.
CSMG Performs a bit-by-bit selective merge.
CVMGM Performs a conditional vector merge, negative.
CVMGN Performs a conditional vector merge, nonzero.
CVMGP Performs a conditional vector merge, positive.
CVMGT Performs a conditional vector merge, true or false.
CVMGZ Performs a conditional vector merge, zero.
INT_MULT_UPPER Multiplies unsigned integers and returns the
uppermost bits.
IRTC Returns the value of the real-time clock in an
integer.
LEADZ Counts the number of leading 0 bits.
LENGTH Returns the number of words in a BUFFER IN or
BUFFER OUT transfer.
LOC Returns the address of a variable, constant, or
array. This is a byte address on the MIPSpro
compiler and a word address on the Cray Fortran
compiler.
NOT Performs a logical complement.
POPCNT Counts the number of set bits.
POPPAR Computes the bit population parity.

SN–2211 1.0 25
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

UNIT Returns the status of a BUFFER IN or


BUFFER OUT statement.

2.3.1.3 System module included in the supercomputing API


The following system module is part of the supercomputing API:
PXF_DEFINITIONS System module containing PXF configuration
information. For the list of PXF routines
supported in the supercomputing API, see
Section 4.2.1.3, page 50.

2.3.2 Cray Fortran intrinsics not included in the supercomputing API


The following are Cray Fortran intrinsic routines that are not included in the
supercomputing API:
• Intrinsics to support IEEE floating-point arithmetic (see Section 2.3.3, page
26).
• Miscellaneous intrinsics (see Section 2.3.4, page 28).

2.3.3 Intrinsics to support IEEE arithmetic not in the supercomputing API

The intrinsic procedures described in this section support the IEEE Standard for
Binary Floating-point Arithmetic, ANSI/IEEE standard 754/1985. They are not
part of the supercomputing API:
CLEAR_IEEE_EXCEPTION Clears a floating-point
exception indicator.
DISABLE_IEEE_INTERRUPT Disables floating-point
interrupts.
ENABLE_IEEE_INTERRUPT Enables floating-point
interrupts.
GET_IEEE_EXCEPTIONS Retrieves flags that represent
the current floating-point
exception status.
GET_IEEE_INTERRUPTS Retrieves flags that represent
the current floating-point
interrupt status.

26 SN–2211 1.0
Fortran [2]

GET_IEEE_ROUNDING_MODE Returns the current


floating-point rounding
mode.
GET_IEEE_STATUS Retrieves flags that represent
the current floating-point
status.
IEEE_BINARY_SCALE Returns y multiplied by 2n.
IEEE_CLASS Returns the class to which x
belongs.
IEEE_COPY_SIGN Returns x with the sign of y.
IEEE_EXPONENT Returns the unbiased
exponent of x.
IEEE_FINITE Tests for x being greater than
negative infinity and less
than positive infinity.
IEEE_INT Converts x to an integral
value according to the
rounding mode in effect.
IEEE_IS_NAN Tests for x being a NaN.
IEEE_NEXT_AFTER Returns the next
representable neighbor of x in
the direction toward y.
IEEE_REAL Converts x to a real value
according to the rounding
mode in effect.
IEEE_REMAINDER Returns the remainder of the
operation x/y.
IEEE_UNORDERED Tests for x or y being a NaN.
SET_IEEE_EXCEPTION Sets a floating-point exception
indicator.
SET_IEEE_EXCEPTIONS Restores the floating-point
status.
SET_IEEE_INTERRUPTS Restores the floating-point
interrupt status.

SN–2211 1.0 27
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SET_IEEE_ROUNDING_MODE Restores the floating-point


rounding mode.
SET_IEEE_STATUS Restores the floating-point
status.
TEST_IEEE_EXCEPTION Returns the state of a
floating-point exception.
TEST_IEEE_INTERRUPT Returns the state of a
floating-point interrupt.

2.3.4 Miscellaneous intrinsics not included in the supercomputing API


The following miscellaneous Cray Fortran intrinsic routines are not supported
by MIPSpro and are not included in the supercomputing API:
CLOC Returns the character descriptor of a character
entity. This is a byte address on both MIPSpro
and Cray Fortran compilers.
FCD Constructs a Cray character pointer in Fortran in
character descriptor format.
GETPOS and SETPOS Obtains a file position or returns a file to a
previous position.
M@CLR Clears the bit matrix loaded (BML) bit. (For the C
language version of this and the following four
intrinsics, see Section 3.3.2.2, page 41.)
M@LD Loads a bit matrix into the bit matrix function
unit.
M@LDMX Loads a bit matrix and multiplies.
M@MX Returns a bit matrix product.
M@UL Unloads the bit matrix function unit.
MY_PE Returns the number of the PE on which it is
executing. This runs on UNICOS/mk systems
only. As a replacement, use the external SHMEM
library routine of the same name (see Section
4.7.1.1, page 71). Similarly, the N$PES constant is
replaced by the external NUM_PES(3F) routine (see
).

28 SN–2211 1.0
Fortran [2]

MEMORY_BARRIER Blocks memory loads and stores until the


processor finishes.
NUMARG Returns the number of arguments in a
subprogram call.
REMOTE_WRITE_BARRIER Blocks the processor until remote writes have
finished.
RTC Returns the value of the real-time clock in a real
value with no conversion. Use IRTC instead.
WRITE_MEMORY_BARRIER Blocks the processor until stores have finished.

2.3.5 Intrinsics common to Cray Fortran and MIPSpro not in the supercomputing API
The following intrinsics are presently supported by both Cray Fortran and
MIPSpro but are not included in the supercomputing API:
• Specific intrinsic procedures for double and complex double data types (see
Section 2.3.5.1, page 29).
• General intrinsic routines common to MIPSpro and Cray Fortran but not in
the supercomputing API (see Section 2.3.5.2, page 30).
• Cray Fortran system module not included in the supercomputing API (see
Section 2.3.5.3, page 31).
• Common system module not included in the supercomputing API (see
Section 2.3.5.4, page 31).

2.3.5.1 Double and complex double intrinsics not included in the supercomputing API
The following specific intrinsic entry points are not included in the
supercomputing API. They are supported on both MIPSpro and Cray Fortran
compilers. Instead of the routine names listed here, use the generic name for
the same routine. For instance, use ABS instead of CDABS.
The data type and data type parameters for arguments to these intrinsics
depend on the architecture. The entry points beginning with CD require two
128-bit real values on Cray PVP architectures and two 64-bit real values on
MIPSpro systems. (If -dlb is specified on the MIPSpro command line, a CD
value is two 128–bit real values.) The D set of entry points requires 128-bit real
arguments on Cray PVP systems and 64-bit real arguments on MIPSpro
systems. (If -d16 is specified on the MIPSpro command line, a D value is a
128–bit real value.)

SN–2211 1.0 29
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

CDABS Returns the absolute value.


CDCOS Returns the cosine.
CDEXP Computes the exponential function.
CDLOG Computes the natural logarithm.
CDSIN Computes the sine.
CDSQRT Computes the square root.
DCMPLX Converts to type double complex.
DCONJG Computes the conjugate.
DCOT Returns the cotangent.
DFLOAT Converts to double precision.
DIMAG Returns the imaginary part of a double complex
number.
DREAL Converts to the double-precision real type.

2.3.5.2 General intrinsic routines not in the supercomputing API


The following general intrinsic routines are implemented by both MIPSpro and
Cray Fortran but are not in the supercomputing API:
CLOCK Returns the current time in ASCII code. Use the
DATE_AND_TIME intrinsic subroutine in its place.
DATE Returns the current date in ASCII code. Use the
DATE_AND_TIME intrinsic subroutine in its place.
JDATE Returns the current Julian date in ASCII code.
Use the DATE_AND_TIME intrinsic subroutine in
its place.
RANF Returns a floating-point random number. Use the
RANDOM_NUMBER intrinsic subroutine in its place.
RANGET Returns a random seed. Use the RANDOM_SEED
intrinsic subroutine in its place.

30 SN–2211 1.0
Fortran [2]

RANSET Establishes a random seed. Use the


RANDOM_SEED intrinsic subroutine in its place.

2.3.5.3 Cray Fortran system module not included in the supercomputing API
The following Cray Fortran system module is not part of the supercomputing
API:
CRI_IEEE_DEFINITIONS The module containing IEEE Fortran definitions.
This is the alternate and obsolete name for
FTN_IEEE_DEFINITIONS (see the following
section).

2.3.5.4 Common system module not included in the supercomputing API


The following system module is implemented in both Cray Fortran and
MIPSpro Fortran but is not part of the supercomputing API:
FTN_IEEE_DEFINITIONS The module containing IEEE Fortran definitions.

SN–2211 1.0 31
C and C++ [3]

This chapter describes the API for C and C++. The following high-level topics
are described in this chapter:
• Extensions to the language standards (see Section 3.1, page 33).
• #pragma directives (see Section 3.2, page 34).
• Built-in functions (see Section 3.3, page 39).
• Predefined macros (see Section 3.4, page 42).
In this chapter, SGI C and C++ refers to the language that is part of the
supercomputing application programming interface (API).
For information on C and C++ environment variables, see Chapter 6, page 109.
Command-line options are not considered part of the API in this document.

3.1 Language elements


The supercomputing API for C is defined by the International Standards
Organization (ISO) standard ISO/IEC 9899:1990 and the American National
Standard Institute (ANSI) X3.159–1989 standard. For C++, the ISO/ANSI Draft
Proposed International Standard — Programming Language C++, numbers
X3J16/94–0158 and WG21/n0545, defines the supercomputing API.
This section is organized as follows:
• Language extensions to the standard that are part of the supercomputing
API (see Section 3.1.1, page 33).
• Cray C and C++ extensions that are not included in the supercomputing
API (see Section 3.1.2, page 34).
For more information on these extensions, see the Cray C/C++ Reference Manual,
publication SR–2179.

3.1.1 Language extensions included in the supercomputing API


The C and C++ languages consist of the elements described in the standards
and the extensions to the standards described in this section. The extensions
described here are part of the supercomputing API.

SN–2211 1.0 33
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

_Pragma Alternative form of specifying a directive. It


allows directives to appear in macros. Available
in C and C++.
complex type Provides complex float and complex
double data types for use on all systems.
Available only in C.
fortran For information on interlanguage communication
from C and C++, including the fortran
keyword, see Chapter 7, page 113.
Restricted pointers The restrict type qualifier is used to assert the
absence of aliasing through a pointer type.
Available in C and C++.
Variable length arrays An array type, the size of which is determined at
run time. Available only in C.

3.1.2 Cray C and C++ extension not included in the supercomputing API
The following Cray C and C++ extension to the standards is not part of the
supercomputing API:
Hexadecimal Floating constants can be represented in
floating-point constants hexadecimal. This feature is not portable because
identical floating-point constants can have
different meanings on different systems. The next
proposed C standard will include a different way
of specifying this. Available only in C.

3.2 #pragma directives


This section is organized as follows:
• C and C++ directives included in the supercomputing API (see Section 3.2.1,
page 35).
• Cray Research C directives that are not part of the supercomputing API (see
Section 3.2.2, page 36).

• Directives that are common to MIPSpro and Cray Research C/C++ but are
not included in the Supercomputing API (see Section 3.2.3, page 39).

34 SN–2211 1.0
C and C++ [3]

For more information on these directives, see the Cray C/C++ Reference Manual,
publication SR–2179

3.2.1 Directives included in the supercomputing API


The following #pragma directives are part of the supercomputing API.
The directives are organized as follows:
• Parallel directives (see Section 3.2.1.1, page 35).
• General directives (see Section 3.2.1.2, page 35).

3.2.1.1 Parallel directives in the supercomputing API


Note: Due to nondisclosure agreements, this document cannot describe the C
and C++ parallel directives currently being defined until the process of
defining them is complete. They will be described in a future update.

3.2.1.2 General directives included in the supercomputing API


Except where noted, the MIPSpro and Cray C/C++ versions of the following
directives will give the same results on current Silicon Graphics and Cray
Research systems as well as on future architectures.
ident Adds a comment section in the object file and
puts the revision string inside it.
inline and noinline The inline directive replaces calls to
user-defined functions with the code representing
the function. The noinline directive turns off
inlining.
instantiate Instantiates a specified instance of a template
declaration.
can_instantiate Indicates that a specified entity can be instantiated
in the current compilation, but that it need not be.
do_not_instantiate Suppresses the instantiation of a specified entity.
ivdep Directs the compiler to ignore vector
dependencies for the loop immediately following
the directive.

SN–2211 1.0 35
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

unroll Specifies the number of the copies of the loop


body that should be added to the inner loop.

3.2.2 Cray Research C directives not included in the supercomputing API


The following Cray Research C directives are not part of the supercomputing
API. Most of these directives are specific to Cray PVP and Cray MPP hardware
and have no direct counterparts on future hardware platforms.
align

Causes functions, loops, or labels to be aligned on instruction


buffer boundaries. (Cray PVP systems only.)
bounds and nobounds

When bounds checking is in effect, pointer references are


checked to ensure that they are not 0 or are not greater than the
machine memory limit. Array references are checked to ensure
that the array subscript is not less than 0 or greater than or
equal to the declared size of the array. The bounds directive
specifies that pointer and array references are to be checked.
The nobounds directive specifies that this checking is to be
disabled. (C only)
cache_align

Aligns each specified variable on a cache line boundary. (Cray


MPP systems only.)
cache_bypass

Offers a semi-automatic method for programmers to run local


memory references through E-registers on the CRAY T3E
system. (CRAY T3E system only.)
common and taskcommon
A common directive ensures that specified variables are
accessible to all tasks (not stored as taskcommon). When a
variable is designated as taskcommon, subsequent declarations
of that variable in the same source file inherit the task common
storage class.

36 SN–2211 1.0
C and C++ [3]

duplicate

Lets you provide additional, externally visible names for


specified functions.
message

Directs the compiler to write the message defined by the text to


standard error as a warning message. Unlike the error
directive, the compiler continues after processing a message
directive.
noreduction

Directs the compiler not to optimize the loop that immediately


follows the directive as a reduction loop.
novector

Directs the compiler to not vectorize the loop that immediately


follows the directive.
novsearch

Directs the compiler to not vectorize the search loop that


immediately follows the directive. (Cray PVP systems only)
opt and noopt

The opt directive directs the compiler to optimize the source


code that follows the directive. The noopt directive disables all
automatic optimizations and causes optimization directives to
be ignored.
prefertask

Directs the compiler to generate tasked code for the loop that
immediately follows it if that loop contains more than one loop
in the nest that can be tasked. (Cray PVP systems only)
prefervector

Directs the compiler to vectorize the loop that immediately


follows the directive if the loop contains more than one loop in
the nest that can be vectorized. (Cray PVP systems only)

SN–2211 1.0 37
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

shortloop

Improves performance of a vectorized loop by allowing the


compiler to omit the run-time test to determine whether it has
completed. Iterations are less than or equal to 64. (Cray PVP
systems only)
shortloop128

Improves performance of a vectorized loop by allowing the


compiler to omit the run-time test to determine whether it has
completed. Iterations are less than or equal to 128. (Cray PVP
systems only)
soft

Specifies external identifiers with references that are to be


considered soft (meaning it has been referenced in another code
file). Soft external references can be to a function or to a data
object.
split

Instructs the compiler to attempt to split the following loop into


a set of smaller loops. (CRAY T3E systems only)
suppress

Suppresses optimization in two ways, determined by its use


with either a global or local scope. First, if the scope is global,
the suppress directive specifies that all associated local and
task common variables are to be written to memory before a
call to the specified function. Second, if the scope is local, the
suppress directive stores current values of the specified
variables in memory.
symmetric

Declares that an auto or register variable has the same local


address on all processing elements (PEs). (Cray MPP systems
only)
taskprivate and taskshared

Ensures that the specified variables are either private to each


task or are shared by all tasks. (Cray PVP systems only)

38 SN–2211 1.0
C and C++ [3]

uses_eregs

Informs other software entities that the program accesses E


registers. (CRAY T3E systems only)
vfunction

Lists external functions that use the call-by-register calling


sequence. (Cray PVP systems only)

3.2.3 Common directives not included in the supercomputing API


The following directives are implemented in both MIPSpro and Cray Research
C and C++:
case and endcase The case directive serves as a separator between
adjacent code blocks that are concurrently
executable. It can appear only in a parallel
region. The endcase directive serves as the
terminator for a group of one or more parallel
cases. (Cray PVP systems only.)
guard and endguard The guard and endguard directives delimit a
guarded region and provide the necessary
synchronization to protect (or guard) the code
inside the guarded region. (Cray PVP systems
only.)
parallel and Delimits a parallel region. (Cray PVP systems
endparallel only.)
taskloop and The taskloop directive indicates that the
endloop following loop can be executed in parallel by
multiple processors. The endloop directive is a
special terminator for the taskloop directive
inside a parallel region. (Cray PVP systems only.)

3.3 Built-in functions


A built-in function, in the case of C and C++, is a C library function of which
the compiler has specific knowledge. The following subsections describe the
built-in functions supported in the supercomputing API and by the Cray
Research C and C++ compilers:

SN–2211 1.0 39
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

• Built-in functions included in the supercomputing API (see Section 3.3.1,


page 40).
• Cray Research built-in functions not included in the supercomputing API
(see Section 3.3.2, page 41).
For more information on a built-in function, see the respective man page.

3.3.1 Built-in functions included in the supercomputing API


The following built-in functions are defined for the supercomputing API.
_dshiftl and Shifts bits to the left or right.
_dshiftr
_gbit and _gbits Returns the value of a specified number of bits.
_int_mult_upper Multiplies two operands as unsigned 64-bit
integers and returns the upper 64 bits of the
128-bit, unsigned result.
_leadz Returns the number of leading zeros in a data
word.
_mask, _maskl, and Returns a mask of bits set to 1, either left-justified
_maskr or right-justified.
_my_pe Returns the number of the processing element
(PE) on which it is executing.
_num_pes Returns the number of PEs available to your
program.
_pbit and _pbits Returns a word with a specified bit (or bits) set to
the rightmost bit (or bits) of another word.
_popcnt and _poppar The _popcnt function returns the number of bits
set to 1 (the population count) in a data word.
The _poppar function returns a 0 if a data word
has an even number of bits set to 1 and a 1 if it
does not.

40 SN–2211 1.0
C and C++ [3]

_rtc Returns the value of the real-time clock as a long


value.

3.3.2 Cray Research built-in functions not included in the supercomputing API
The following Cray Research C and C++ built-in functions are not included in
the supercomputing API. They are organized as follows:
• Built-in functions for all Cray Research systems (see Section 3.3.2.1, page 41)
• Built-in functions for Cray PVP systems (see Section 3.3.2.2, page 41)
• Built-in functions for Cray MPP systems (see Section 3.3.2.3, page 42)
Most of these functions are peculiar to Cray PVP or Cray MPP systems and
have no direct counterparts on future hardware platforms.

3.3.2.1 Built-in functions for all Cray Research systems


The following C and C++ built-in functions are implemented on all Cray
Research systems and are not part of the supercomputing API:
_argcount and Returns the number of arguments passed to the
_numargs function in which the call appears.
_ranf Returns a random floating-point number that is
larger than 0.0 and smaller than 1.0.

3.3.2.2 Built-in functions only for Cray PVP systems


The following C and C++ built–in functions are implemented only on Cray
Research PVP systems and are not part of the supercomputing API:
_cmr Assures completion of all memory references
within the current CPU.
_EX Exits to either the address in the address register
or the exchange address register.
_getvm and _setvm Retrieves or sets the contents of the vector mask
register.
_mclr, _mld, _mldmx, Performs operations on bit matrix multiply
_mmx, and _mul hardware. (For the Fortran language versions of
these built-in functions, see Section 2.3.4, page 28).

SN–2211 1.0 41
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

_readSB and Reads from and writes to shared B registers.


_writeSB
_readSR Returns the value of status register 0.
_readST and Reads from and writes to shared T registers.
_writeST
_semclr, _semget, Performs clear, get, put, set, and test-and-set
_semput, _semset, operations on semaphores.
and _semts

3.3.2.3 Built-in functions only for Cray MPP systems


The following C and C++ built–in functions are implemented only on Cray
Research MPP systems and are not part of the supercomputing API:
_memory_barrier Guarantees that all
subsequent loads or stores
will not access memory until
after all previous loads and
stores finish accessing
memory.
_remote_write_barrier Blocks the processor until all
outstanding remote write
request packets have been
processed.
_write_memory_barrier Guarantees that all preceding
store instructions have
completed modifying
memory before any
subsequent loads or stores
reference memory.

3.4 Predefined macros


The following sections describe the macros supported in the supercomputing
API and by the Cray Research C and C++ compilers:
• Predefined macros included in the supercomputing API (see Section 3.4.1,
page 43).

42 SN–2211 1.0
C and C++ [3]

• Cray Research C and C++ macros that are not included in the
supercomputing API (see Section 3.4.2, page 43)

3.4.1 Predefined C and C++ macros included in the supercomputing API


The following macros are part of the supercomputing API:
unix and _ _unix Defined as 1 if the operating system is UNIX.

3.4.2 Cray Research C macros not in the supercomputing API


The Cray Research C macros described in this section are not part of the
supercomputing API. The section is organized as follows:
• Host machine macros (see Section 3.4.2.1, page 43)
• Target machine macros (see Section 3.4.2.2, page 43)
• Compiler information macros (see Section 3.4.2.3, page 44)
Most of these macros are peculiar to Cray PVP or Cray MPP systems and have
no direct counterpart on future hardware platforms.

3.4.2.1 Host machine macro not included in the supercomputing API


The following is a Cray Research host machine macro that is not part of the
supercomputing API:
_UNICOS Defined as 1 if the operating system is UNICOS.

3.4.2.2 Target machine macros not included in the supercomputing API


The following are Cray Research target machine macros that are not part of the
supercomputing API:
cray, CRAY, and Defined as 1 on all Cray PVP and Cray MPP
_CRAY systems.
CRAY1 and _CRAY1 Defined as 1 on all Cray PVP systems
_CRAYMPP Defined as 1 on all Cray MPP systems.
_CRAYT3E Defined as 1 on CRAY T3E systems.
_CRAYIEEE Defined as 1 if the targeted CPU type uses IEEE
floating-point format.

SN–2211 1.0 43
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

_ADDR32 or _ADDR64 Defined as 1 if the targeted CPU has 32-bit


address registers (_ADDR32) or 64–bit registers
(_ADDR64).
_LD64 Defined as 1 if the long double basic type has
64 bits of precision; undefined if 128-bit precision
is used.
_FASTMD Defined as 1 if the fast multiply/divide sequence
is enabled. It is not defined if the machine type is
Cray MPP.
_MAXVL Defined as the maximum hardware vector length
(64 or 128). It is not defined if the machine type
is Cray MPP.

3.4.2.3 Compiler information macros not included in the supercomputing API


The following macros are not part of the supercomputing API. They return
information about the compiler:
_RELEASE Defined as the major release level of the compiler.
_CRAYC Defined as 1 to identify the Cray Standard C
compiler.

44 SN–2211 1.0
Language Libraries [4]

This chapter defines the supercomputing application programming interface


(API) for the major programming environment libraries. It is divided into the
following sections:
• General considerations, or API issues that do not apply to any single library
(see Section 4.1, page 45).
• Fortran applications libraries (see Section 4.2, page 46).
• The mathematical library (see Section 4.3, page 63).
• The scientific libraries (see Section 4.4, page 66).
• The Message Passing Interface (MPI) library (see Section 4.5, page 70).
• The Parallel Virtual Machine (PVM) message-passing library (see Section 4.6,
page 70).
• The shared memory (SHMEM) library (see Section 4.7, page 71).
The system library, or C and C++ library, is described in Chapter 5, page 85.

4.1 General considerations


This section describes components that do not fall into one of the other
categories. It is organized as follows:
• Utilities or commands included in the supercomputing API (see Section
4.1.1, page 45).
• UNICOS commands that are not included in the supercomputing API (see
Section 4.1.2, page 46).
Only a few commands closely associated with library implementation and
usage are listed in this section.

4.1.1 Utilities or commands included in the supercomputing API


The following utilities and commands are part of the supercomputing API:
assign(1) The assign command is closely related to
Flexible File I/O (FFIO), described in Section

SN–2211 1.0 45
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

4.2.1.2, page 47. It can be used to select a variety


of I/O options, including how input is stored.
explain(1) The explain utility retrieves and displays a
message explanation from an online explanation
catalog. The catalog is created using gencat(1),
which is part of the X/Open XPG4 specification.
The caterr(1) utility, which processes message
text files, is present on IRIX systems.

4.1.2 Cray Research commands not included in the supercomputing API


The following UNICOS commands are not part of the supercomputing API:
fdcp(1) Copies data while preserving record blocking.
asgcmd(1) Assigns options for library file open processing.

4.2 Fortran applications library


This section describes the Fortran applications library. It is organized as follows:
• Routines in the supercomputing API (see Section 4.2.1, page 46).
• Cray Fortran routines that are not in the supercomputing API (see Section
4.2.2, page 53).
• Extensions common to MIPSpro and Cray Fortran that are not included in
the common API (see Section 4.2.3, page 62).

4.2.1 Applications library routines in the supercomputing API


The following are parts of the MIPSpro and Cray Fortran library and are
included in the supercomputing API:
• Almost all of the routines in the Cray Fortran applications library. The
exceptions are listed in Section 4.2.2, page 53. The routines in the
supercomputing API are described in the Cray Research publication
Application Programmer’s Library Reference Manual, publication SR–2165.
• Parallel run-time routines (see Section 4.2.1.1, page 47).
• Most of the layers in the Cray Research flexible file I/O (FFIO) product (see
Section 4.2.1.2, page 47).

46 SN–2211 1.0
Language Libraries [4]

• The PXF routines defined by the IEEE standard interface (see Section 4.2.1.3,
page 50).
• Fortran utility subroutines (see Section 4.2.1.4, page 52).
• Foreign dataset conversion routines (see Section 4.2.1.5, page 52).

4.2.1.1 Parallel runtime routines included in the supercomputing API


Note: Due to nondisclosure agreements, this document cannot describe the
new parallel runtime routines until the process of defining them is complete.
They will be described in a future update.

4.2.1.2 Flexible file I/O (FFIO) layers included in the supercomputing API
Most of the FFIO functionality is part of the supercomputing API. For
information on the related assign(1) command, see Section 4.1.1, page 45.

The following layers either already are or will be part of the supercomputing
API:
bufa Provides asynchronous buffering.
bmx or tape Implements tape I/O. Each logical record
requested is a physical tape block.
cache Allows efficient random-access I/O, even when
file access is clustered in several regions of a file.
cachea Implements asynchronous cached I/O. When
sequential access patterns are detected while
reading, asynchronous read-ahead is performed,
provided that the number of pages to read ahead
has been specified.
cos Implements COS blocking. This is the default
record blocking used for Fortran unformatted
sequential I/O on UNICOS and UNICOS/mk
systems.
event Monitors I/O occurring between two layers on a
per-file basis. This layer generates statistics in an
ASCII log file.
f77 FORTRAN 77/UNIX Fortran record blocking.
This is the common blocking format used by
most FORTRAN 77 compilers on UNIX systems.

SN–2211 1.0 47
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

fd Connects to a specific file descriptor.


global Provides a file that is global to all PEs.
ibm Provides record blocking for common record
types on IBM operating systems.
mr Specifies memory-resident files.
null Implements syntactic no-op. null can be
specified where syntax demands a value, but no
function is desired.
syscall Implements system I/O call. Each I/O operation
results in a corresponding system call.
system Implements generic system I/O layer. Selects
bmx, er90, or syscall as appropriate.
text Terminates records with a special character.
user or site Lets a user or a site add custom I/O handlers for
specific needs at load time.
vms Provides record blocking for common record
types on VMS/MS operating systems.
The user interface to many FFIO routines is not the same on IRIX as it is on
UNICOS systems. On UNICOS systems, many of the FFIO routines can accept
a variable number of arguments (for example, ffread(3C)). On IRIX systems,
with the exception of ffopen, all of the C-callable FFIO routines require a fixed
number of parameters. For example, ffread requires three parameters. A new
function, ffreadf(3C), has been created for both IRIX and UNICOS systems. It
requires the full number of parameters that can be passed to ffread on
UNICOS systems. The following is an example of the syntax for ffreadf:

extern ssize_t ffreadf (int fd, void *buf, size_t nb, struct
ffsw *stat, int fulp, int *ubc);

The following C functions used with FFIO either already are or will be in the
common set:
ffbksp(3C) and ffbkspf(3C)

Performs a backspace operation on those FFIO layers that


support it.

48 SN–2211 1.0
Language Libraries [4]

ffclose(3C) and ffclosef(3C)

Closes an FFIO file.


fffcntl(3C)

Performs functions on files opened using FFIO.


ffopen(3C), ffopenf(3C), and ffopens(3C)

Opens a file.
ffpos(3C)

Positions files opened using FFIO.


ffread(3C) and ffreadf(3C)

Reads from a file using FFIO.


ffreada(3C)

Provides an asynchronous read.


ffseek(3C) and ffseekf(3C)

Repositions an FFIO file.


ffsetsp(3C)

Initiates end-of-volume (EOV) processing for files opened using


FFIO.
ffweof(3C), ffweoff(3C), ffweod(3C), and ffweodf(3C)

Writes end-of-file or end-of-data.


ffwrite(3C) and ffwritef(3C)

Writes to a file.
ffwritea(3C)

Provides an asynchronous write.


The following data conversion routines, specified by the -N option on the
assign command, are part of the supercomputing API. These conversions are
between MIPSpro format and the following formats:
• Cray Fortran floating-point

SN–2211 1.0 49
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

• Generic 32-bit IEEE format


• CRAY T90 64-bit IEEE format
• Cray MPP systems 64-bit IEEE format
• IEEE double-precision
• IBM format
• IBM double-precision format
• VMS format
• VMS double-precision format
• Ultrix format
• Ultrix double-precision format

4.2.1.3 PXF routines in the supercomputing API


The following PXF Posix routines are part of the supercomputing API:

IPXFARGC IPXFWIFEXITSTATUS IPXFWSTOPSIG


IPXFWTERMSIG PXFACCESS PXFALARM
PXFCALLSUBHANDLE PXFCFGETISPEED PXFCFGETOSPEED
PXFCFSETISPEED PXFCFSETOSPEED PXFCHDIR
PXFCHMOD PXFCHOWN PXFCHROOT
PXFCLEARENV PXFCLOSE PXFCLOSEDIR
PXFCONST PXFCREAT PXFCTERMID
PXFDUP PXFESTRGET PXFEXECV
PXFEXECVE PXFEXECVP PXFEXIT
PXFFASTEXIT PXFFCNTL PXFFDOPEN
PXFFDUP PXFFGETC PXFFLUSH
PXFFILENO PXFFORK PXFFPATHCONF
PXFFPUTC PXFFSEEK PXFFSTAT
PXFFTELL PXFGETARG PXFGETC

50 SN–2211 1.0
Language Libraries [4]

PXFGETCWD PXFGETEGID PXFGETENV


PXFGETEUID PXFGETGID PXFGETGRGID
PXFGETGRGNAM PXFGETGROUPS PXFGETLOGIN
PXFGETPGRP PXFGETPID PXFGETPPID
PXFGETPWNAM PXFGETPWUID PXFGETSUBHANDLE
PXFGETUID PXFINTGET PXFINTSET
PXFISATTY PXFISBLK PXFISCHR
PXFISDIR PXFISFIFO PXFISREG
PXFKILL PXFLINK PXFLOCALTIME
PXFLSEEK PXFMKFIFO PXFOPEN
PXFOPENDIR PXFPATHCONF PXFPAUSE
PXFPIPE PXFPOSIXIO PXFPUTC
PXFREAD PXFREADDIR PXFRENAME
PXFREWINDDIR PXFRMDIR PXFSETENV
PXFSETGID PXFSETPGID PXFSETSID
PXFSETUID PXFSIGACTION PXFSIGADDSET
PXFSIGDELSET PXFSIGEMPTYSET PXFSIGFILLSET
PXFSIGISMEMBER PXFSIGPENDING PXFSIGSUSPEND
PXFSLEEP PXFSTAT PXFSTRGET
PXFSTRSET PXFSTRUCTCOPY PXFSTRUCTCREATE
PXFSTRUCTFREE PXFSYSCONF PXFTCDRAIN
PXFTCFGETATTR PXFTCFLOW PXFTCFLUSH
PXFTCFSETATTR PXFTCGETPGRP PXFTCSENDBREAK
PXFTCSETPGRP PXFTIME PXFTIMES
PXFTTYNAME PXFUCOMPARE PXFUMASK
PXFUNAME PXFUNLINK PXFUTIME
PXFWAIT PXFWAITPID PXFWIFEXITED
PXFWIFSIGNALED PXFWIFSTOPPED PXFWRITE

SN–2211 1.0 51
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

4.2.1.4 Fortran utility subroutines included in the supercomputing API


The following Cray Fortran utility subroutines are part of the supercomputing
API:
ABORT(3F) Requests an abort, provides an optional message
written to the stderr file, and creates a core
dump. UNICOS and UNICOS/mk systems
provide a traceback, but IRIX systems do not.
EXIT(3F) Ends the execution of a Fortran program.
ISHELL(3F) Executes a UNICOS shell command.
MOVBIT(3F) Moves bits from one variable or array to another.
Data position numbering begins at 1.
MOVBITZ(3F) Moves bits from one variable or array to another.
Data position numbering begins at 0.
NUMBLKS(3F) Returns the current size of a file in 512-word
blocks.
SECOND(3F) Returns the elapsed user CPU time (a real
number in seconds) since the start of a program.
SECONDR(3F) Returns the elapsed wall–clock time in seconds.
STRMOV(3F) Moves bytes from one variable or array to
another.
TIMEF(3F) Returns the elapsed time since the first call.

4.2.1.5 Foreign dataset conversion routines in the supercomputing API


The following foreign dataset conversion routines are part of the
supercomputing API. For information on data conversion routines available
through the assign(1) command, see Section 4.1.1, page 45. For information on
data manipulation routines that are Cray Fortran extensions to the common set,
see Section 4.2.2.1, page 53.
CRI2IBM and IBM2CRI Converts between Cray PVP systems IEEE format
and IBM format.
CRI2IEG and IEG2CRI Converts between Cray Fortran IEEE data types
and generic IEEE data types.
CRI2IEU and IEU2CRI Converts between Cray PVP systems non-IEEE
data types and Ultrix-style little endian IEEE data
types.

52 SN–2211 1.0
Language Libraries [4]

USCCTC and USCCTI Converts between IBM EBCDIC characters and


ASCII characters.

4.2.2 Cray Fortran applications library extensions that are not in the supercomputing API
The following applications library routines are Cray Fortran extensions to the
Fortran 90 standard. They are not in the supercomputing API. They are
organized as follows:
• Data conversion routines (see Section 4.2.2.1, page 53).
• Tasking routines (see Section 4.2.2.2, page 56).
• I/O routines and packages (see Section 4.2.2.3, page 57).
• Math routines (see Section 4.2.2.4, page 58).
• Resource management routines (see Section 4.2.2.5, page 58).
• Program analysis (see Section 4.2.2.6, page 59).
• NAMELIST character manipulation routines (see Section 4.2.2.7, page 60).
• General routines (see Section 4.2.2.8, page 60).

4.2.2.1 Data conversion routines not in the supercomputing API


The following Cray Fortran data conversion routines are not in the
supercomputing API. This section is organized as follows:
• Routines that are not vendor-specific (see Section 4.2.2.1.1, page 53).
• Control Data conversion procedures (see Section 4.2.2.1.2, page 54).
• IBM conversion procedures (see Section 4.2.2.1.3, page 54).
• Cray IEEE conversion procedures (see Section 4.2.2.1.4, page 55).
• VAX/VMS conversion procedures (see Section 4.2.2.1.5, page 56).

4.2.2.1.1 Routines that are not vendor-specific


The following conversion routines are not vendor-specific and are not in the
supercomputing API:

SN–2211 1.0 53
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

B2OCT(3F) Places an octal Hollerith representation of a Cray


Fortran numeric value into a specified part of an
integer array.
CHCONV(3F) Converts decimal ASCII numerals to an integer
value.
RBN(3F) and RNB(3F) Converts trailing blanks to nulls and vice versa.

4.2.2.1.2 Control Data conversion procedures


The following procedures convert between Control Data and Cray Research
formats and are not in the supercomputing API:
CRAY2CDC(3F) and Converts CDC data to Cray Research format and
CDC2CRAY(3F) vice versa.
CRAY2ETA(3F) and Converts ETA/CYBER 205 data to Cray Research
ETA2CRAY(3F) format and vice versa.
CRAY2NVE(3F) and Converts NOS/VE data to Cray Research format
NVE2CRAY(3F) and vice versa.
P6460(3F) and Packs or unpacks 60-bit words into or from Cray
U6064(3F) 64-bit words.
ASCDC(3F) and Converts CDC display code character to ASCII
DSASC(3F) character and vice versa.
FP6064(3F) and Converts between CDC 60-bit and Cray Research
FP6460(3F) 64-bit numbers.
INT6064(3F) and Converts CDC 60-bit integers to Cray Research
INT6460(3F) 64-bit integers.

4.2.2.1.3 IBM conversion procedures


The following procedures convert between IBM and Cray Research formats and
are not in the supercomputing API:
CRAY2IBD(3F) and Converts between IBM and PVP. Single and
IBD2CRAY(3F) double floating-point values are both treated as
64 bits.
CRAY2IBM(3F) and Converts between IBM and Cray format.
IBM2CRAY(3F)
P32(3F) and U32(3F) Packs and unpacks 32-bit items from 64-bit items.

54 SN–2211 1.0
Language Libraries [4]

USDCTC(3F) Converts IBM 64-bit floating-point to Cray PVP


systems real.
USDCTI(3F) Converts Cray PVP real to IBM 64-bit
floating-point.
USICTC(3F) Converts an IBM 2-byte or 4-byte integer to a
Cray 8-byte integer.
USICTI(3F) Converts a Cray 8-byte integer to an IBM 2-byte
or 4-byte integer.
USICTP(3F) Converts a Cray integer to an IBM packed
decimal.
USLCTC(3F) Converts an IBM 1-byte or 4-byte IBM logical to a
Cray 8-byte logical.
USLCTI(3F) Converts a Cray 8-byte logical to an IBM 1-byte
or 4-byte logical.
USPCTC(3F) Converts an IBM packed decimal to an
INTEGER*4 variable.
USSCTC(3F) Converts two IBM (32-bit) single-precision
variables, packed two per Cray 64-bit word, into
two Cray single-precision (64-bit) floating-point
variables.
USSCTI(3F) Converts two Cray single-precision values (64-bits
each) into two IBM single-precision (32-bits each)
values packed in a Cray 64-bit word.

4.2.2.1.4 Cray IEEE conversion procedures


The following procedures convert between IEEE and Cray Research formats
and are not in the supercomputing API:
CRAY2CRI(3F) and Converts between Cray PVP 64-bit data types and
CRI2CRAY(3F) Cray IEEE 64-bit data types.
CRAY2IEG(3F) and Converts between Cray PVP data types and
IEG2CRAY(3F) generic IEEE data types.
CRI2IEG_77(3F) and Converts between Cray MPP IEEE data types and
IEG2CRI_77(3F) generic IEEE data types.

SN–2211 1.0 55
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

CRY2CRI(3F) and Converts between Cray PVP floating-point data


CRI2CRY(3F) and Cray IEEE floating-point data.

4.2.2.1.5 VAX/VMS conversion procedures


The following procedures convert between VAX/VMS and Cray Research
formats and are not in the supercomputing API:
VAX2CRAY(3F) and Converts between Cray PVP data types and
CRAY2VAX(3F) VAX/VMS data types.
VXBCTI(3F) and Converts between Cray PVP non-IEEE
VXBCTC(3F) double-precision numbers and VAX 64-bit D
format values.
VXDCTC(3F) and Converts between Cray PVP non-IEEE
VXDCTI(3F) single-precision numbers and VAX 64-bit D
format values.
VXGCTC(3F) and Converts between Cray PVP non-IEEE
VXGCTI(3F) single-precision numbers and VAX 64-bit G
format values.
VXICTC(3F) and Converts between Cray PVP 64-bit integers and
VXICTI(3F) VAX 16-bit and 32-bit integers.
VXLCTC(3F) and Converts between Cray 64-bit logical values and
VXLCTI(3F) VAX logical values.
VXSCTC(3F) and Converts between Cray PVP non-IEEE
VXSCTI(3F) single-precision numbers and VAX 32-bit F
format values.
VXZCTC(3F) and Converts between Cray PVP non-IEEE complex
VXZCTI(3F) single-precision values and VAX 64-bit D format
complex values.

4.2.2.2 Tasking routines not included in the supercomputing API


The following tasking routines are not part of the supercomputing API:
BARASGN(3F), Implements synchronization barriers.
BARREL(3F), and
BARSYNC(3F)
BUFDUMP(3F),
BUFPRINT(3F),

56 SN–2211 1.0
Language Libraries [4]

Allows user access to the multitasking history


trace buffer.
BUFTUNE(3F), and
BUFUSER(3F)
ICPUSED(3F) Gets task CPU time in real-time clock (RTC) ticks.
ICRITADD(3F) and Changes a value by adding it to or multiplying it
ICRITMUL(3F) by another value under the protection of a
hardware semaphore.
ISELFADD(3F), Changes a value by adding another value to it,
ISELFMUL(3F), and multiplying it by another value, or incrementing
ISELFSCH(3F) it by 1 under the protection of a hardware
semaphore.
TSKLIST(3F), Returns the status of a task, returns information
TSKTEST(3F), and on whether a task exists, and modifies tuning
TSKTUNE(3F) parameters within the library scheduler.
XCRITADD(3F), Changes a value by adding it to or multiplying it
XCRITMUL(3F), by another value under the protection of a
XSELFADD(3F), and hardware semaphore. XCRITADD(3F) and
XSELFMUL(3F) XCRITMUL(3F) are subroutines, and
XSELFADD(3F), and XSELFMUL(3F) are functions.

4.2.2.3 I/O routines and packages not included in the supercomputing API
The following I/O routines and I/O packages are not part of the
supercomputing API:
AQIO

Includes the following asynchronous queued I/O routines:


AQOPEN(3F), AQCLOSE(3F), AQREAD(3F), AQREADC(3F),
AQWRITE(3F), AQWRITEC(3F), and AQSTAT(3F).
DRIO

Performs unbuffered, record-addressable, random-access I/O.


This package includes the following routines: OPENDR(3F),
READDR(3F), WRITDR(3F), CLOSDR(3F), ASYNCDR(3F),
CHECKDR(3F), WAITDR(3F), SYNCDR(3F), and STINDR(3F).
FSUP(3F), FSUPC(3F), ISUP(3F), and ISUPC(3F)

Suppress values in Fortran edit-directed output.

SN–2211 1.0 57
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

MSIO

Performs buffered, record-addressable, random-access I/O. This


package includes the following routines: OPENMS(3F),
READMS(3F), WRITMS(3F), CLOSMS(3F), ASYNCMS(3F),
CHECKMS(3F), WAITMS(3F), SYNCMS(3F), STINDX(3F), and
FINDMS(3F).
READ(3F), READC(3F), READCP(3F), and READP(3F)

Reads words or characters in full or partial record modes.


WAIO

Performs unformatted buffered I/O. This package includes the


following routines: WOPEN(3F), GETWA(3F), SEEK(3F),
PUTWA(3F), APUTWA(3F), and WCLOSE(3F).
WRITE(3F), WRITEC(3F), WRITECP(3F), and WRITEP(3F)

Writes words or characters in full or partial record modes.

4.2.2.4 Math routines not included in the supercomputing API


The following math routines are not part of the supercomputing API:
GAMMA(3M) Computes log gamma.
ICEIL(3F) Returns the integer ceiling of a rational number.

4.2.2.5 Resource management routines not in the supercomputing API


The following resource management routines are not part of the
supercomputing API:
HPALLOC(3F), HPCHECK(3F), HPCLMOVE(3F), HPDEALLC(3F), HPDUMP(3F),
HPNEWLEN(3F), and HPSHRINK(3F)

Manages memory from the program’s heap.


IHPLEN(3F), IHPSTAT(3F), and IHPVALID(3F)

Returns information about the heap.


NLIMIT(3F)

Provides an interface to setting or obtaining resource limit


values.

58 SN–2211 1.0
Language Libraries [4]

SDSALLOC(3F), SDSFREE(3F), SDSINFO(3F), and SDSREALC(3F)

Secondary data segment (SDS) management routines.


SHPALLOC(3F), SHPCLMOVE(3F), and SHPDEALLC(3F)

Manages the shared heap.


STACKSZ(3C) and STKSTAT(3C)

Reports stack statistics.

4.2.2.6 Program analysis routines not included in the supercomputing API


The following program analysis routines are not part of the supercomputing
API:
CRAYDUMP(3F) Dumps arrays of memory.
FLOWMARK(3C) Divides a large function into several smaller
logical functions for Flowtrace.
FSIGCTL(3F) Specifies an action on receipt of a signal.
GETCALLERINFO(3F) Returns the name and line number of the calling
routine.
GETNAMEQ(3F) Returns the name of the calling routine.
ISERIAL(3F) Retrieves the machine serial number. This is used
by Flowtrace routines and is not user-callable.
SYMDUMP(3F) and Produces a symbolic snapshot dump, or a
SYMDEBUG(3F) symbolic snapshot, of a running program.
TRACEBK(3F), TRBK(3F), Prints a traceback, lists all subroutines active in
and TRBKLVL(3F) the current calling sequence, and returns
information on the current level of the calling
sequence.
TREMAIN(3F) Returns the CPU time (in seconds, of type real)
remaining for the program.
TSECND(3F) Returns elapsed CPU time for a calling task or
process.

SN–2211 1.0 59
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

XPFMT(3F) Produces a printable image of an exchange


package.

4.2.2.7 NAMELIST character manipulation routines not included in the supercomputing API
The Cray Fortran NAMELIST character manipulation routines, beginning with
RNL and WNL, are not part of the supercomputing API. See the respective man
pages for more information.

4.2.2.8 General routines not included in the supercomputing API


The following are Cray Fortran routines that are not part of the supercomputing
API:
BITVEC(3F) and BITVECM(3F)

Generates a bit mask corresponding to integer or real arrays, or


to marked integer arrays, according to a specified condition.
CLEARBT(3F), SENSEBT(3F), and SETBT(3F)

Disables bidirectional memory transfers, determines if


bidirectional memory transfer is enabled or disabled, and
enables bidirectional memory transfers.
CLEARFI(3F), SETFI(3F), and SENSEFI(3F)

Modifies floating-point interrupt status.


ERREXIT(3F)

Requests a program abort.


GETARG(3F), GETOARGC(3F), GETVARG(3F), GETVARGC(3F), and IARGC(3F)

Returns either the number of command-line arguments or the


arguments themselves. For alternatives, use the PXFGETARG(3F)
and IPXFARGC(3F) routines.
GETCPUS

Gets slave tasks for Autotasking.


GETCWD(3F)

Returns the current working directory. As an alternative, see


PXFGETCWD(3F).

60 SN–2211 1.0
Language Libraries [4]

GETHOST(3F)

Returns the name of the host mainframe.


GETPMC(3F)

Returns 128-word output array describing machine


characteristics.
GTSTDPTR(3F)

Returns a pointer to a standard file.


MVC(3F)

Moves characters.
NUMARG(3I)

Returns the number of arguments.


PACK(3F)

Compresses stored data.


PUTBYT(3F) and IGTBYT(3F)

Replaces or extracts a byte from a variable or an array.


REMARK(3F), REMARK2(3F), and REMARKF(3F)

Enters a message in the stderr file.


SAMEFILE(3F)

Checks to see whether two files have the same inode number.
SETPLIMQ(3F)

Initiates a detailed tracing of each call and return.


SHUTDSAV(3F)

Sets up the calling program to be checkpointed on system


shutdown.
SIGOFF(3F) and SIGON(3F)

Controls the receipt of signals.

SN–2211 1.0 61
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

TMADW(3F), TMAMU(3F), TMATS(3F), TMINIT(3F), TMMSC(3F), TMMVE(3F),


TMPTC(3F), TMPTS(3F), TMSRC(3F), and TMVSC(3F)

Manages tables.
UNAME(3F)

Returns the name of the current operating system.


UNPACK(3F)

Expands stored data.

4.2.3 Common MIPSpro and Cray Fortran extensions not in the supercomputing API
The following routines are common to MIPSpro and Cray Fortran but are not
part of the supercomputing API:
EVASGN(3F) Identifies an integer variable to be used as an
event.
EVCLEAR(3F) Clears an event and returns control to the calling
task.
EVPOST(3F) Posts an event and returns control to the calling
task.
EVREL(3F) Releases the identifier assigned to an event.
EVTEST(3F) Returns the state of an event.
EVWAIT(3F) Delays the calling task until the specified event is
posted.
LOCKASGN(3F) Identifies an integer variable intended for use as a
lock.
LOCKOFF(3F) Clears a lock and returns control to the calling
task.
LOCKON(3F) Sets a lock and returns control to the calling task.
LOCKREL(3F) Releases the identifier assigned to a lock.
LOCKTEST(3F) Tests a lock to determine its state (locked or
unlocked).
NLOCKOFF(3F) Clears a nested lock and returns control to the
calling task.

62 SN–2211 1.0
Language Libraries [4]

NLOCKON(3F) Sets a nested lock and returns control to the


calling task.
NLOCKTEST(3F) Tests a nested lock to determine its state (locked
or unlocked).
TSKSTART(3F) Initiates a task.
TSKVALUE(3F) Retrieves user identifier specified in task control
array.
TSKWAIT(3F) Waits for the indicated task to complete execution.
A timing routine Possibly TSECND(3F).

4.3 Mathematical library


This section is organized as follows:
• Math routines included in the supercomputing API (see Section 4.3.1, page
63).
• Cray Fortran math routines not included in the supercomputing API (see
Section 4.3.2, page 65).

4.3.1 Math routines included in the supercomputing API


The following math routines are common to MIPSpro and Cray Fortran and are
part of the supercomputing API. In many cases, a routine will have both a C
and Fortran version of the same name.
abs, cabs, dabs, and Computes absolute value.
iabs
acos and dacos Computes arccosine (inverse cosine).
aimag Returns the imaginary part of a complex number.
alog, dlog, and clog Computes natural logarithm.
alog10 and dlog10 Computes common logarithm.
aint and dint Performs real and double-precision truncation to
an integer.
asin and dasin Computes arcsine (inverse sine).
atan and datan Computes arctangent (inverse tangent) for single
argument.

SN–2211 1.0 63
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

atan2 and datan2 Computes arctangent (inverse tangent) for two


arguments.
char and ichar Converts between character and integer types.
cmplx Converts to type complex.
conjg Computes conjugate of a complex number.
cos, ccos, and dcos Computes cosine.
cosh and dcosh Computes hyperbolic cosine.
dble Converts to type double-precision.
dim, ddim, and idim Computes the positive difference of two numbers.
erf Error function. (SGI)
erfc Complementary error function. (SGI)
exp, cexp, and dexp Computes the exponential function.
index Determines the starting location of a character
substring in a string.
int, idint, and ifix Converts to type integer.
j0, j1, and jn Bessel functions. (SGI)
len Determines the length of a character string.
lge, lgt, lle, and llt Compares strings lexically.
max0, max1, amax0, Returns maximum values.
amax1, and dmax1
min0, min1, amin0, Returns minimum values.
amin1, and dmin1
mod, amod, and dmod Computes the remainder.
nint and idnint Converts to nearest integer.
real, float, and Converts to type real.
sgnl
sign, dsign, and Transfers the sign of one number to another.
isign
sin, csin, and dsin Computes the sine.
sinh and dsinh Computes the hyperbolic sine.
sqrt, csqrt, and Computes the square root.
dsqrt

64 SN–2211 1.0
Language Libraries [4]

tan and dtan Computes the tangent.


tanh and dtanh

y0, y1, and yn Computes Bessel functions. (SGI)

4.3.2 Cray mathematical routines not in the supercomputing API


The following routines are Cray Fortran, C, and C++ mathematical routines that
are not included in the supercomputing API. These routines are vectorized Cray
MPP intrinsics.
ALOG_V and HLOG_V Computes natural algorithm.
COS_V and HCOS_V Computes cosine.
COSS_V and HCOSS_V Returns the cosine and sine.
EXP_V and HEXP_V Returns the exponential function.
POPCNT_V Counts the number of bits set to 1 in a 64-bit
word.
RANF_V Returns a random floating-point number.
RTOR_VV and HTOR_VV Raises the base value to a power.
SIN_V and HSIN_V Computes the sine.
SQRT_V, SQRTINV_V, Computes the square root.
HSQRTINV_V, and
HSQRT_V
On Cray PVP systems, Cray Fortran recognizes a CDIR$ VFUNCTION directive
that specifies a vectorizable function. The directive declares that a vector
version of an external function exists. The VFUNCTION directive is also used to
specify a basic scalar function with a specific interface.
Neither the basic scalar functions nor their vector versions are included in the
supercomputing API. Some of the VFUNCTIONS are as follows (this list is not
complete):
CBRT Returns the cube root.
COSS COS(X) + i * SIN(X)

SN–2211 1.0 65
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SNGLR Rounds numbers.

4.4 Scientific libraries


The Silicon Graphics/Cray scientific library (SCSL) is a new library that is part
of the supercomputing API. It is initially available on IRIX 6.4 systems and,
over time, will become the standard scientific library available with SGI Fortran.
The new library will merge the functionality of the MIPSpro
CHALLENGEcomplib and Cray Research’s LIBSCI into a single library, creating
a library that scales from a single processor to a large number of processors on
a variety of platforms.
This section is organized as follows:
• Scientific library packages in the supercomputing API (see Section 4.4.1,
page 66).
• Cray Fortran scientific library packages that are not included in the
supercomputing API but that will be carried forward on current Cray
Research systems (see Section 4.4.2, page 68).

4.4.1 Scientific library packages included in the supercomputing API


The following scientific library components are available in SCSL 1.0 and are
part of the supercomputing API. For information on individual SCSL routines,
see the online man pages.
Standard BLAS The BLAS (Basic Linear Algebra Subprograms) is
a library of routines that perform basic operations
involving matrices and vectors. They were
designed as a way of achieving efficiency in the
solution of linear algebra problems. There are
three levels of BLAS. The original set of BLAS,
commonly referred as the Level 1 BLAS, performs
low-level operations such as dot product and the
adding of a multiple of one vector to another.
The Level 2 BLAS routines perform matrix-vector
operations that occur frequently in the
implementation of many of the most common
linear algorithms. The Level 3 BLAS routines are
targeted at matrix-matrix operations.

66 SN–2211 1.0
Language Libraries [4]

Nonstandard BLAS The nonstandard BLAS routines are extensions to


the standard Level 1, 2, and 3 BLAS libraries
distributed by the University of Tennessee.
LAPACK LAPACK is a library of FORTRAN 77 subroutines
for solving the most common problems in
numerical linear algebra: systems of linear
equations, linear least squares problems,
eigenvalue problems, and singular value
problems.
FFT Applies one or more Fast Fourier Transforms.
The library consist of 1D, multiple 1D, 2D, and
3D FFT routines that can compute either forward
or inverse Fourier transforms.
Future releases of SCSL will likely contain, but are not limited to, the following.
The interfaces for the distributed FFT, linear recurrence, convolution, direct
sparse, and sorting and searching components of the scientific library are not
yet defined.
ScaLAPACK ScaLAPACK version 1.5 is a supported subset of
LAPACK routines redesigned for distributed
memory and multiple instruction, multiple data
(MIMD) parallel computers. It is currently written
in a single instruction, multiple data (SIMD) style,
using explicit message passing for interprocessor
communication. It assumes matrices are laid out
in a two-dimensional block cyclic decomposition.
The goal is to have ScaLAPACK routines resemble
their LAPACK equivalents as much as possible.
The fundamental building blocks of the
ScaLAPACK library are distributed memory
versions of the Level 1, 2, and 3 BLAS (the
PBLAS), and a set of Basic Linear Algebra
Communication Subprograms (BLACS) for
communication tasks that arise frequently in
parallel linear algebra computations. In the
ScaLAPACK routines, all interprocessor
communication occurs within the PBLAS and the
BLACS.
Distributed FFT This package is a subset of the FFT routines
redesigned for distributed memory and multiple

SN–2211 1.0 67
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

instruction, multiple data (MIMD) parallel


computers. The goal is to have distributed FFT
routines resemble their single-processor
equivalents as much as possible.
Convolution The convolution/correlation package consists of a
set of routines for performing time domain
convolution/correlation filter operations on
1-dimensional and 2-dimensional data. This
package consists of two subpackages: one is an
older set of routines available only on Cray PVP
systems (using both Cray arithmetic and IEEE
arithmetic), and the other is a newer set of
routines available only on Cray MPP systems.
Direct sparse A collection of direct sparse solvers.
Linear recurrence This is a collection of linear recurrence solvers.
Sorting and searching A collection of sorting and searching routines.

4.4.2 Cray Research-specific packages not in the supercomputing API


Cray Research will continue to support the following packages on current
machine lines, but they are not a part of the supercomputing API:
Cray convolution The convolution/correlation package consists of a
set of routines for performing time domain
convolution/correlation filter operations on
1-dimensional and 2-dimensional data. This
package consists of two subpackages: one is an
older set of routines available only on Cray PVP
systems (with either Cray arithmetic or IEEE
arithmetic), and the other is a newer set of
routines available only on Cray MPP systems.
Cray direct sparse (Cray PVP systems only, including both Cray
arithmetic and IEEE arithmetic) A collection of
direct sparse solvers.
Cray distributed FFT (Cray MPP systems) The distributed FFT routines
consist of a subset of the single-processor FFT
routines redesigned for distributed memory and
multiple instructions, multiple data (MIMD)
parallel computers. It is currently written in a
single instruction, multiple data (SIMD) style,

68 SN–2211 1.0
Language Libraries [4]

using explicit message passing for interprocessor


communication. The goal is to have distributed
FFT routines resemble their single-processor
equivalents as much as possible.
Cray FFT (All Cray Research systems) These routines apply
one or more Fast Fourier Transforms. The library
consists of 1D, multiple 1D, 2D, and 3D FFT
routines. They can compute either forward or
inverse Fourier transforms. This package consists
of two packages: one is an older set of routines
available only on Cray arithmetic PVP systems,
and the other is a newer set of routines available
on both the Cray arithmetic and IEEE systems.
Cray linear recurrence (All Cray Research systems) A collection of linear
recurrence solvers.
Cray sorting and This package consists of two separate
searching subpackages: one is an older set of routines
available only on Cray PVP systems (Cray
arithmetic and IEEE systems), and the other is a
newer set of routines available only on Cray MPP
systems.
EISPACK (Cray PVP systems with Cray arithmetic only)
EISPACK is a collection of Fortran subroutines
that compute the eigenvalues and eigenvectors of
nine classes of matrices: complex general,
complex Hermitian, real general, real symmetric,
real symmetric banded, real symmetric
tridiagonal, special real tridiagonal, generalized
real, and generalized real symmetric matrices. In
addition, two routines are included that use
singular value decomposition to solve certain
least-squares problems.
LINPACK (Cray PVP systems with Cray arithmetic only)
LINPACK is a collection of Fortran subroutines
that analyze and solve linear equations and linear
least-squares problems. The package solves linear
systems whose matrices are general, banded,
symmetric indefinite, symmetric positive definite,
triangular, and tridiagonal square. In addition,
the package computes the QR and singular value

SN–2211 1.0 69
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

decompositions of rectangular matrices and


applies them to least-squares problems.
SITRSOL (Cray PVP systems with either Cray arithmetic or
IEEE arithmetic). Solves a real general sparse
system, using preconditioned iterative methods.
Sparse BLAS 1 (Cray PVP systems with either Cray arithmetic or
IEEE arithmetic) Sparse SAXPY(3S) and SDOT(3S)
routines.
VBLAS (Cray PVP systems with either Cray arithmetic or
IEEE arithmetic) This is a collection of out-of-core
BLAS 3 routines.
VLAPACK (Cray PVP systems with either Cray arithmetic or
IEEE arithmetic) A collection of out-of-core
routines for linear algebra that solve problems too
large to fit in main memory during program
execution.
Superseded routines (Cray PVP systems with Cray arithmetic only)
These routines are superseded by newer routines.
This package includes MXV, MXVA, MXM, MXMA,
MINV, SXMPY, GATHER, SCATTER, and other
routines.

4.5 MPI library


Message Passing Interface (MPI) library is included in the supercomputing API.
The intent is to stay current with the MPI specification, MPI: A Message-Passing
Interface Standard. Current product plans are focused on version 1.2 of this
specification, with implementation of many MPI-2 functions planned for later
releases.

4.6 PVM library


The Parallel Virtual Machine (PVM) library is included in the supercomputing
API. The intent is to stay current with the releases from Oak Ridge National
Laboratory (ORNL). Current product plans are focused on version 3.3.10 from
ORNL.

70 SN–2211 1.0
Language Libraries [4]

4.7 Shared memory library


The shared memory library (SHMEM) is a high-performance message-passing
system, callable from both Fortran and C. It is implemented on all UNICOS and
UNICOS/mk systems and will be implemented on all IRIX Origin platforms.
The section is organized as follows:

• SHMEM routines included in the supercomputing API (see Section 4.7.1,


page 71).
• SHMEM routines not included in the supercomputing API (see Section 4.7.2,
page 82).

4.7.1 SHMEM routines included in the supercomputing API


The SHMEM routines in the supercomputing API are organized as follows:
• PE query routines (see Section 4.7.1.1, page 71).
• Block data put routines (see Section 4.7.1.2, page 72).
• Block data get routines (see Section 4.7.1.3, page 73).
• Strided put routines (see Section 4.7.1.4, page 74).
• Strided get routines (see Section 4.7.1.5, page 75).
• Point–to–point synchronization routines (see Section 4.7.1.6, page 76).
• Barrier routines (see Section 4.7.1.7, page 76).
• Atomic memory fetch-and-operate routines (see Section 4.7.1.8, page 77).
• Reduction routines (see Section 4.7.1.9, page 78).
• Cache management routines (see Section 4.7.1.10, page 80).
• Collective communication (see Section 4.7.1.11, page 81).

4.7.1.1 PE query routines in the supercomputing API


The following SHMEM routines in the supercomputing API are available only
in Fortran:
MY_PE(3F) Returns the number of the Processing Element
(PE) on which it is executing. This is a more

SN–2211 1.0 71
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

portable replacement for the intrinsic routine of


the same name.
SHMEM_MY_PE(3) Returns the number of the PE on which it
executes.
NUM_PES(3F) Returns the number of processing elements (PEs)
running in an application. This is a more portable
replacement for the named constant, N$PES.
SHMEM_N_PES(3) Returns the number of PEs involved in a program.
The following SHMEM routines in the supercomputing API are available only
in C and C++:
_my_pe Returns the number of the Processing Element
(PE) that is executing. This is a more portable
replacement for the intrinsic routine of the same
name.
shmem_my_pe(3) Returns the number of the PE on which it
executes.
_num_pes Returns the number of processing elements (PEs)
running in an application. This is a more portable
replacement for the intrinsic routine of the same
name.
shmem_n_pes(3) Returns the number of PEs involved in a program.

4.7.1.2 Block data put routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available with C, C++, and Fortran:
shmem_put32(3), shmem_put64(3), and shmem_put128(3)

Sends 32–bit, 64–bit, and 128–bit data.


shmem_putmem(3)

Sends data of any byte size and alignment. (This is not


implemented on Cray PVP systems.)
The following SHMEM routines are in the supercomputing API and are
available only with Fortran:

72 SN–2211 1.0
Language Libraries [4]

SHMEM_COMPLEX_PUT(3), SHMEM_REAL_PUT(3), SHMEM_INT_PUT(3), and


SHMEM_LOGICAL_PUT(3)

Sends arrays of the indicated type.


SHMEM_PUT4(3) and SHMEM_PUT8(3)

Sends 32–bit and 64-bit data.


The following SHMEM routines are in the supercomputing API and are
available only with C and C++:
shmem_double_put(3), shmem_float_put(3), shmem_int_put(3),
shmem_long_put(3), and shmem_short_put(3)

Sends arrays of the indicated type.


shmem_longdouble_put(3)

Sends arrays of type long double. (This is not implemented


on CRAY T3E systems.)
shmem_longlong_put(3)

Sends arrays of type long long. (This is not implemented on


Cray PVP or CRAY T3E systems.)
shmem_double_p(3), shmem_float_p(3), shmem_int_p(3),
shmem_long_p(3), and shmem_short_p(3)

Transfers one data item to a remote PE at very low latency.

4.7.1.3 Block data get routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available with C, C++, and Fortran:
shmem_get32(3), shmem_get64(3), and shmem_get128(3)

Retrieves 32–bit, 64–bit, and 128–bit data.


shmem_getmem(3)

Retrieves data of any byte size and alignment. (This is not


implemented on Cray PVP systems.)
The following SHMEM routines are in the supercomputing API and are
available only with Fortran:

SN–2211 1.0 73
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SHMEM_COMPLEX_GET(3), SHMEM_INTEGER_GET(3), SHMEM_LOGICAL_GET(3),


and SHMEM_REAL_GET(3)

Retrieves arrays of the indicated type.


SHMEM_GET4(3) and SHMEM_GET8(8)

Retrieves 32-bit and 64-bit data.


The following SHMEM routines are in the supercomputing API and are
available only with C and C++:
shmem_double_get(3), Retrieves arrays of the
shmem_float_get(3), indicated type.
shmem_int_get(3),
shmem_long_get(3), and
shmem_short_get(3)
shmem_longdouble_get(3) Retrieves arrays of type long
double. (This is not
implemented on CRAY T3E
systems.)
shmem_longlong_get(3) Retrieves arrays of type
long long. (This is not
implemented on CRAY T3E
or Cray PVP systems.)
shmem_double_g(3), Transfers one data item from
shmem_float_g(3), shmem_int_g, a remote PE at very low
shmem_long_g(3), and latency (C and C++ only).
shmem_short_g(3)

4.7.1.4 Strided put routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available with C, C++, and Fortran:
shmem_iput32(3), shmem_iput64(3), and shmem_iput128(3)

Sends strided 32–bit, 64–bit, and 128–bit data.


The following SHMEM routines are in the supercomputing API and are
available only with Fortran:

74 SN–2211 1.0
Language Libraries [4]

SHMEM_COMPLEX_IPUT(3), SHMEM_INTEGER_IPUT(3),
SHMEM_LOGICAL_IPUT(3), and SHMEM_REAL_IPUT(3)

Sends strided arrays of the designated type.


SHMEM_IPUT4(3) and SHMEM_IPUT8(3)

Sends strided 32-bit and 64-bit data.


The following SHMEM routines are in the supercomputing API and are
available only with C and C++:
shmem_double_iput(3)shmem_float_iput(3)shmem_int_iput(3)shmem_long_iput(3)

Sends strided arrays of the designated type.


shmem_longdouble_iput(3)

Sends strided arrays of type long double (This is not


implemented on CRAY T3E systems.).

4.7.1.5 Strided get routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available with C, C++, and Fortran:
shmem_iget32(3), shmem_iget64(3), and shmem_iget128(3)

Retrieves stride 32–bit, 64–bit, and 128–bit data.


shmem_longdouble_iget(3)

Retrieves strided arrays of type long double. (This is not


implemented on CRAY T3E systems.)
shmem_longlong_iget(3)

Retrieves strided arrays of type long long. (This is not


implemented on Cray PVP or CRAY T3E systems.)
The following SHMEM routines are in the supercomputing API and are
available only with Fortran:

SN–2211 1.0 75
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SHMEM_COMPLEX_IGET(3), SHMEM_INTEGER_IGET(3),
SHMEM_LOGICAL_IGET(3), and SHMEM_REAL_IGET(3)

Retrieves strided arrays of the designated type.


(SHMEM_REAL_IGET is not implemented on CRAY T3E
systems.)
SHMEM_IGET4(3) and SHMEM_IGET8(3)

Retrieves strided 32-bit and 64-bit data.


The following SHMEM routines are in the supercomputing API and are
available only with C and C++:
shmem_double_iget(3), shmem_float_iget(3), shmem_int_iget(3),
shmem_long_iget(3), and shmem_short_iget(3)

Retrieves strided arrays of the designated type.

4.7.1.6 Point–to–point synchronization routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available with C, C++, and Fortran:
shmem_fence(3)

Assures order in delivery of puts.


shmem_quiet(3)

Waits for completion of all outstanding remote writes initiated


from the current PE.
shmem_wait(3), and shmem_wait_until(3)

Waits for a variable on the local PE to change.


start_pes(3)

Starts a group of PEs for a message-passing or data-passing


program.

4.7.1.7 Barrier routines in the supercomputing API


The following SHMEM routine is in the supercomputing API and are available
with C, C++, and Fortran:

76 SN–2211 1.0
Language Libraries [4]

shmem_barrier_all(3)

Defines a point in a program beyond which none of the PEs can


proceed until all of them arrive.

4.7.1.8 Atomic memory fetch-and-operate routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available with C, C++, and Fortran:
shmem_swap(3)

Performs an atomic swap operation.


The following SHMEM routines are in the supercomputing API and are
available only with Fortran:
SHMEM_INT4_CSWAP(3) and SHMEM_INT8_CSWAP(3)

Performs an atomic conditional swap to a remote data object.


SHMEM_INT4_MSWAP(3) and SHMEM_INT8_MSWAP(3)

Performs an atomic masked swap to a remote data object.


SHMEM_INT4_SWAP(3), SHMEM_INT8_SWAP(3), SHMEM_REAL4_SWAP(3), and
SHMEM_REAL8_SWAP(3)

Performs an atomic swap operation.


FAST_SHMEM_INT4_INC(3) and SHMEM_INT4_FINC(3)

Performs an atomic increment and fetch-and-increment


operation, respectively, on remote data.
SHMEM_INT4_FADD(3)

Performs an atomic fetch-and- add operation on a remote data


object. (This routine is not available on Cray PVP systems.)
SHMEM_INT4_INC(3)

Performs an atomic increment operation on a remote data object.

SN–2211 1.0 77
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SHMEM_CLEAR_LOCK(3), SHMEM_SET_LOCK(3), and SHMEM_TEST_LOCK(3)

Releases, locks, and tests a mutual exclusion memory lock.


The following SHMEM routines are in the supercomputing API and are
available only with C and C++:
shmem_short_inc(3), Performs atomic increment and
fetch-and-increment operations on remote data.
shmem_short_finc(3)fast_shmem_short_inc(3),
fast_shmem_short_finc(3),
shmem_clear_lock(3), Releases, locks, and tests a mutual exclusion
shmem_set_lock(3), memory lock.
and
shmem_test_lock(3)
shmem_short_swap(3), Performs atomic swap, conditional swap, and
shmem_int_swap(3), masked swap operations.
shmem_long_swap(3),
shmem_float_swap(3),
shmem_double_swap(3),
shmem_short_cswap(3),
shmem_int_cswap(3),
shmem_long_cswap(3),
shmem_short_mswap(3),
shmem_int_mswap(3),
and
shmem_long_mswap(3)

4.7.1.9 Reduction routines in the supercomputing API


The following SHMEM routines are available only in Fortran.
SHMEM_INT8_AND_TO_ALL(3) andSHMEM_INT4_AND_TO_ALL(3)

Performs a logical AND function across a set of PEs.


SHMEM_INT8_MAX_TO_ALL(3), SHMEM_INT4_MAX_TO_ALL(3),
SHMEM_REAL8_MAX_TO_ALL(3), and SHMEM_REAL4_MAX_TO_ALL(3)

Performs a maximum value function reduction across a set of


PEs.

78 SN–2211 1.0
Language Libraries [4]

SHMEM_INT8_MIN_TO_ALL(3), SHMEM_INT4_MIN_TO_ALL(3),
SHMEM_REAL16_MIN_TO_ALL(3), SHMEM_REAL8_MIN_TO_ALL(3), and
SHMEM_REAL4_MIN_TO_ALL(3)

Performs a minimum value function reduction across a set of


PEs.
SHMEM_INT8_SUM_TO_ALL(3), SHMEM_INT4_SUM_TO_ALL(3),
SHMEM_REAL8_SUM_TO_ALL(3), SHMEM_REAL16_SUM_TO_ALL(3),
SHMEM_REAL4_SUM_TO_ALL(3), SHMEM_COMP8_SUM_TO_ALL(3), and
SHMEM_COMP4_SUM_TO_ALL(3)

Performs a summation reduction across a set of PEs.


SHMEM_INT8_PROD_TO_ALL(3), SHMEM_INT4_PROD_TO_ALL(3),
SHMEM_REAL16_PROD_TO_ALL(3), SHMEM_REAL8_PROD_TO_ALL(3), and
SHMEM_REAL4_PROD_TO_ALL(3), SHMEM_COMP8_PROD_TO_ALL(3),
SHMEM_COMP4_PROD_TO_ALL(3),

Performs a product function reduction across a set of PEs.


SHMEM_INT4_ADD(3)

Performs an atomic add operation on a remote data object.


(This is not implemented on Cray PVP systems.)
SHMEM_INT8_OR_TO_ALL(3) and SHMEM_INT4_OR_TO_ALL(3)

Performs a logical OR function reduction across a set of PEs.


SHMEM_INT8_XOR_TO_ALL(3), SHMEM_INT4_XOR_TO_ALL(3),
SHMEM_REAL8_XOR_TO_ALL(3), SHMEM_COMP8_XOR_TO_ALL(3),
SHMEM_REAL4_XOR_TO_ALL(3), and SHMEM_COMP4_XOR_TO_ALL(3)

Performs an exclusive OR function reduction across a set of PEs.


The following SHMEM routines are available only in C and C++.
shmem_short_add(3) and shmem_short_fadd(3)

Performs an atomic add operation and an atomic fetch-and-add


operation, respectively, on a remote data object. (The
shmem_short_fadd routine is not available on Cray PVP
systems.)
shmem_int_and_to_all(3) and shmem_short_and_to_all(3)

Performs a logical AND reduction across a set of PEs.

SN–2211 1.0 79
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

shmem_double_max_to_all(3), shmem_longdouble_max_to_all(3),
shmem_float_max_to_all(3), shmem_int_max_to_all(3), and
shmem_short_max_to_all(3)

Performs a maximum value function reduction across a set of


PEs. (shmem_longdouble_max_to_all is not on the
CRAY T3E system.)
shmem_double_min_to_all(3), shmem_float_min_to_all(3),
shmem_int_min_to_all(3), shmem_longdouble_min_to_all(3), and
shmem_short_min_to_all(3)

Performs a minimum value function reduction across a set of


PEs.
shmem_int_or_to_all(3) and shmem_short_or_to_all(3)

Performs a logical OR function reduction across a set of PEs.


shmem_double_prod_to_all(3), shmem_float_prod_to_all(3),
shmem_int_prod_to_all(3), shmem_short_prod_to_all(3),
shmem_complexf_prod_to_all(3), shmem_complexd_prod_to_all(3),
and shmem_longdouble_prod_to_all(3)

Performs a product function reduction across a set of PEs.


shmem_double_sum_to_all(3), shmem_float_sum_to_all(3),
shmem_int_sum_to_all(3), shmem_short_sum_to_all(3),
shmem_complexf_sum_to_all(3), shmem_complexd_sum_to_all(3), and
shmem_longdouble_sum_to_all(3)

Performs a summation reduction across a set of PEs.


shmem_int_xor_to_all(3) and shmem_short_xor_to_all(3)

Performs a logical exclusive OR function reduction across a set


of PEs.

4.7.1.10 Cache management routines in the supercomputing API


The following SHMEM routines are in the supercomputing API and are
available in C, C++, and Fortran:

80 SN–2211 1.0
Language Libraries [4]

shmem_udcflush(3) and shmem_udcflush_line(3)

Renders the entire cache or a single cache line coherent with


memory.
The following SHMEM routines are in the supercomputing API and are
available only in Fortran:
SHMEM_SET_CACHE_INV(3), SHMEM_SET_CACHE_LINE_INV(3), and
SHMEM_CLEAR_CACHE_INV(3)

Controls data cache.


The following SHMEM routines are in the supercomputing API and are
available only in C and C++:
shmem_set_cache_inv(3), shmem_set_cache_line_inv(3),
shmem_clear_cache_inv(3),

Controls data cache. (These routines are not implemented on


CRAY T90 systems.)

4.7.1.11 Collective communication routines in the supercomputing API


The SHMEM routines described in this section are in the supercomputing API.
The following are Fortran routines:
SHMEM_BROADCAST4(3) and SHMEM_BROADCAST8(3)

Broadcasts data from one PE to multiple PEs.


SHMEM_COLLECT4(3), SHMEM_COLLECT8(3), SHMEM_FCOLLECT4(3), and
SHMEM_FCOLLECT8(3)

Concatenates blocks of data from multiple PEs to an array in


every PE.
The following are C and C++ routines:
shmem_broadcast32(3) and shmem_broadcast64(3)

Broadcasts data from one PE to multiple PEs.

SN–2211 1.0 81
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

shmem_collect32(3), shmem_collect64(3), shmem_fcollect32(3), and


shmem_fcollect64(3)

Concatenates blocks of data from multiple PEs to an array in


every PE.

4.7.2 SHMEM routines not included in the supercomputing API


The following SHMEM routines are implemented on Cray Research systems
only and are not part of the supercomputing API:
• Block data put routines not in the supercomputing API (see Section 4.7.3,
page 82).
• Block data get routines not in the supercomputing API (see Section 4.7.4,
page 82).
• Point–to–point synchronization routines not in the supercomputing API (see
Section 4.7.5, page 83).
• Atomic memory fetch-and-operate routines not in the supercomputing API
(see Section 4.7.6, page 83).
• Reduction routines not in the supercomputing API (see ),

4.7.3 Block data put routines not in the supercomputing API


The following SHMEM routines are not included in the supercomputing API:
SHMEM_PUT(3) and Sends 64-bit data.
shmem_put(3)
SHMEM_BROADCAST(3) Broadcasts data from one PE to multiple PEs.
and
shmem_broadcast(3)

4.7.4 Block data get routines not in the supercomputing API


The following SHMEM routines are not included in the supercomputing API:
SHMEM_GET(3) and shmem_get(3)

Retrieves 64-bit data.

82 SN–2211 1.0
Language Libraries [4]

SHMEM_COLLECT(3), shmem_collect(3), shmem_fcollect(3), and


SHMEM_FCOLLECT(3)

Concatenates blocks of data from multiple PEs to an array in


every PE.

4.7.5 Point–to–point synchronization routines not in the supercomputing API


The following SHMEM routines are not included in the supercomputing API:
SHMEM_CLEAR_EVENT(3), SHMEM_SET_EVENT(3), SHMEM_TEST_EVENT(3),
SHMEM_WAIT_EVENT(3), shmem_clear_event(3), shmem_set_event(3),
shmem_test_event(3), and shmem_wait_event(3)

Releases, posts, and tests an event.

4.7.6 Atomic memory fetch-and-operate routines not in the supercomputing API


The following SHMEM routines are not included in the supercomputing API:
SHMEM_STACK(3) and shmem_stack(3)

Makes a stack address on a remote PE remotely accessible from


the local PE.

SN–2211 1.0 83
System and Library Calls [5]

The base of the supercomputing API is the system calls, library calls, and
include files specified in the X/Open XPG4 standard (documented in the
X/Open CAE Specification, System Interfaces and Headers, Issue 4).
In addition, the supercomputing API supports the following interfaces specified
in the X/Open Single Unix Specification (documented in the X/Open CAE
Specification, System Interfaces and Headers, Issue 4, Version 2):
a64l getpwent select
bcmp gettimeofday setgrent
bcopy getwd setlogmask
brk index setpgrp
bzero insque setpwent
closelog killpg setregid
ecvt l64a setreuid
endgrent lchown sighold
endpwent lockf sigignore
fchmod lstat sigpause
fchown mknod sigrelse
fcvt mktemp
sigset
ffs nftw
srandom
fstatvfs openlog
statvfs
ftok random strdup
ftruncate readlink
strncasecmp
gcvt realpath
symlink
getdtablesize remque
sync
getgrent rindex
syslog
gethostid sbrk
truncate
getpgid

SN–2211 1.0 85
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

ttyslot
utimes

86 SN–2211 1.0
System and Library Calls [5]

The supercomputing API also supports the following interfaces specified by the
POSIX 1003.1-1996 standard:
asctime_r pthread_cond_init
ctime_r pthread_cond_signal
flockfile pthread_cond_timedwait
ftrylockfile pthread_cond_wait
funlockfile pthread_condattr_destroy
getc_unlocked pthread_condattr_init
getchar_unlocked pthread_create
getgrgid_r pthread_detach
getgrnam_r pthread_exit
getlogin_r pthread_getspecific
getpwnam_r pthread_join
getpwuid_r pthread_key_create
gmtime_r pthread_key_delete
localtime_r pthread_mutex_destroy
pthread_atfork pthread_mutex_init
pthread_attr_destroy pthread_mutex_lock
pthread_attr_getdetachstate pthread_mutex_trylock
pthread_attr_getstackaddr pthread_mutex_unlock
pthread_attr_getstacksize pthread_mutexattr_destroy
pthread_attr_init pthread_mutexattr_init
pthread_attr_setdetachstate pthread_once
pthread_attr_setstackaddr pthread_self
pthread_attr_setstacksize pthread_setspecific
pthread_cond_broadcast pthread_sigmask
pthread_cond_destroy putc_unlocked

SN–2211 1.0 87
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

putchar_unlocked strtok_r
rand_r ttyname_r
readdir_r
sigwait
This chapter describes the UNICOS/mk 1.4.1 and UNICOS 9.2 calls that are not
part of the IRIX system. These calls are divided into three groups:
• Calls that will be ported to the IRIX system and are part of the
supercomputing API.
• Calls that will be ported to the IRIX system, but are not part of the
supercomputing API. These calls are not recommended for use in new
applications (since other calls in the supercomputing API have similar
functionality), but are available to help in porting older applications to the
IRIX system. Their use may be deprecated in a later version of the IRIX
system.
• Calls that will not be ported to the IRIX system and should not be used for
portable applications.
The chapter is divided into the following sections:
• Accounting, resource limits, and scheduling (see Section 5.1, page 89)
• File system and I/O (see Section 5.2, page 91)
• Checkpoint and restart feature (see Section 5.2.1, page 92)
• Hardware interfaces (see Section 5.4, page 93)
• Data migration (see Section 5.5, page 94)
• Multilevel security (see Section 5.6, page 95)
• Math functions (see Section 5.7, page 97)
• Multithreaded process support (see Section 5.8, page 98)
• Networking routines (see Section 5.9, page 100)
• Miscellaneous calls (see Section 5.10, page 101)
• Individual system call differences (see Section 5.11, page 105)

88 SN–2211 1.0
System and Library Calls [5]

5.1 Accounting, resource limits, and scheduling


In the UNICOS/mk and UNICOS operating systems, there are some additions
to the standard UNIX accounting, among them the concept of account IDs
(several users can be charged under a single account ID), account records
(daemons can write account records to keep track of I/O, secondary data
segments (SDS), MPP usage, and other activity), and device accounting. Most of
these system and library calls are used by accounting commands and are not
called by user programs.
The UNICOS/mk and UNICOS systems support the concept of a job as a group
of processes that the user cannot change and that share various resource limits.
System calls, such as killm(2) and nicem(2), can specify a particular job as the
target. NQS and job accounting also use the concept.
Several system calls are used for setting and getting process or job resource
limits. The user database (UDB) keeps the resource limit information for each
user.
All of these concepts (except for device accounting) will be added to the IRIX
system, as well as the system and library calls implementing these concepts.
None of these calls are part of the supercomputing API, since they are not
generally used by user applications.

5.1.1 UNICOS/mk and UNICOS calls that are being ported to the IRIX system and are not included in
the supercomputing API
The following UNICOS and UNICOS/mk calls for accounting, resource limits,
and scheduling will be ported, but they are not in the supercomputing API:
acctctl(2)

Checks status of, enables, and disables process, daemon, and


record accounting.
acctid(2)

Changes account ID of a process.


acid2nam(3C), acidnamfree(3C), gid2nam(3C), gidnamfree(3C),
nam2acid(3C), nam2gid(3C), nam2uid(3C), uid2nam(3C)

Maps IDs to name. See the id2nam(3C) man page.


addudb(3C), deleteudb(3C), endudb(3C), getsysudb(3C),
gettrustedudb(3C), getudb(3C), getudbchain(3C), getudbdefault(3C),

SN–2211 1.0 89
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

getudbnam(3C), getudbstat(3C), getudbtmap(3C), getudbuid(3C),


lockudb(3C), rewriteudb(3C), setudb(3C), setudbdefault(3C),
setudbpath(3C), setudbtmap(3C), udbisopen(3C), unlockudb(3C),
zeroudbstat(3C)

Provides user database access functions. See the libudb(3C)


man page.
getjtab(2)

Gets the job table entry associated with a process.


getlim(2), setlim(2)

Gets or sets user-controllable resource limits.


getpermit(2), setpermit(2)

Gets or sets user permissions.


jacct(2)

Enables or disables job accounting.


limit(2)

Sets resource limits.


nlimit(3C)

Provides an interface to setting or obtaining resource limit


values.
setjob(2)

Sets job ID.


waitjob(2)

Gets information about a terminated child job.

90 SN–2211 1.0
System and Library Calls [5]

wracct(2)

Writes an accounting record to the kernel accounting file or to a


daemon accounting file.

5.1.2 UNICOS/mk and UNICOS calls that are not being ported to the IRIX system and are not included
in the supercomputing API
The following UNICOS and UNICOS/mk calls for accounting, resource limits,
and scheduling are not in the supercomputing API:
dacct(2) Enables or disables process and daemon
accounting.
devacct(2) (UNICOS systems only) Controls device
accounting.
limits(2) Returns or sets limits structure for fair-share
scheduler. This system call is used by various
daemons to set user limits for programs.
policy(2) Returns or sets information on the CPU allocation
policy. This system call is used by login
processing.
schedv(2) (UNICOS systems only) Sets memory scheduling
parameters. This system call is called by the
nschedv(1) command, which allows
administrators to change many variables
associated with process scheduling.

5.2 File system and I/O


The IRIX system supports the XFS file system, which supports many of the
same performance and reliability features as NC1FS. Some way of accessing
archived NC1FS file systems will probably be provided. In addition, The IRIX
system supports asynchronous I/O and list I/O via POSIX standard routines
(aio_cancel(3), aio_error(3), aio_fsync(3), aio_hold(3), aio_read(3),
aio_return(3), aio_suspend(3), aio_write(3),lio_listio(3)) which have
slightly different semantics than the UNICOS routines (listio(2), reada(2),
recalls(2), and writea(2).

SN–2211 1.0 91
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

5.2.1 UNICOS/mk and UNICOS calls not included in the supercomputing API
The following file system and I/O calls are not in the supercomputing API:
chacid(2)

Changes disk file account ID.


chdiri(2)

Changes a directory by using the inode number. This system


call is used by special commands, not by user programs.
getdevn(2)

Gets device number of driver entry.


ialloc(2)

Allocates storage for a file. This system call is used by the I/O
libraries to preallocate contiguous space for files whose size is
known.
join(2), fjoin(2)

Joins files. Allows for the efficient concatenation of files.


listio(2)

Initiates a list of I/O requests (with optional striding or


asynchronous I/O). Use lio_listio(3) instead.
lsetattr(2)

Sets metadata for a file.


openi(2)

Opens a file by using the inode number. This system call is


used by special commands, not by user programs.
reada(2)

Performs asynchronous read from a file. Use aio_read(3)


instead.
recall(2), recalla(2), recalls(2)

Waits for I/O completions from asynchronous I/O calls. Use


aio_suspend(3) instead.

92 SN–2211 1.0
System and Library Calls [5]

unlink2(2)

Removes directory entry (returns blocks released). This system


call is used by special commands, not by user programs.
writea(2)

Performs asynchronous write on a file. Use aio_write(3)


instead.

5.3 Checkpoint and restart feature


The IRIX system has a checkpoint and restart feature with similar functionality
to the UNICOS feature, but with different calls (these calls are defined by a
recent POSIX draft).

5.3.1 UNICOS calls not included in the supercomputing API


The UNICOS process and job checkpointing scheme is planned for the
UNICOS/mk 1.5 system. The following system calls are generally used by the
chkpnt(1) and restart(1) commands; user programs can also call them
directly. The following UNICOS calls are not in the supercomputing API:
chkpnt(2) Checkpoints a process, multitask group, or job.
restart(2) Restarts a process, multitask group, or job.
shutdsav(3C) Sets up calling program to be checkpointed on
system shutdown.

5.4 Hardware interfaces


The following sections describe hardware interface calls that are not part of the
supercomputing API.

5.4.1 UNICOS/mk and UNICOS calls not included in the supercomputing API
There are several hardware-specific calls in the UNICOS/mk and UNICOS
systems. The chmem(2) system call can be used to alter the amount of memory
available on the system (for example, so enough memory can be reserved for
diagnostics). The cpselect(2) system call can select a particular CPU to run a
process or job on, and is useful for similar reasons. The ssbreak(2),

SN–2211 1.0 93
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

ssread(2), sswrite(2) system calls (and the sds* routines that call them) are
used to control the use of solid-state storage devices (SSD).
The following hardware-specific calls are not in the supercomputing API:
chmem(2)

(UNICOS systems only) Retrieves or modifies system physical


memory availability.
cpselect(2)

(UNICOS systems only) Selects which processors may run the


process.
exctl(2)

(UNICOS systems only) Exchanges control. This system call is


used by the UNICOS virtual machine feature.
sdsalloc(3C), sdsfree(3C), sdsinfo(3C), sdsrealloc(3C)

(UNICOS systems only) Provides secondary data segment


(SDS) management routine.
ssbreak(2), ssread(2), sswrite(2)

(UNICOS systems only) Changes size of, reads from, or writes


to the secondary data segment (SDS) of the solid-state storage
device.
target(2)

Retrieves or modifies machine characteristics.

5.5 Data migration


The data migration facility (DMF) has been ported to the IRIX system; however,
none of the system calls implementing DMF are part of the supercomputing
API, since they are not generally called by user applications.

5.5.1 UNICOS/mk and UNICOS calls not included in the supercomputing API
The Data Migration Facility (DMF) includes the following system and library
calls. These are used by the dmmode(1) command, the shells, and the data
migration daemon.

94 SN–2211 1.0
System and Library Calls [5]

The following data migration calls are not in the supercomputing API:
dmf_offline(3C), dmf_hashandle(3C), dmf_vendor(3C)

Determines migrated status.


dmmode(2)

Sets Data Migration Facility recall mode.


dmofrq(2)

Processes offline file requests.

5.6 Multilevel security


The IRIX multilevel security implementation has similar functionality to
UNICOS multilevel securityMLS. Both have been B1 evaluated, and both
support mandatory access control (MAC), discretionary access control (DAC)
and access control lists (ACLs), security auditing, identification/authentication
mechanisms, fine-grained privilege support, and secure networking with the IP
security option.
The API for multilevel security will be the IRIX API, which is conformant with
the latest draft of the POSIX standard for system security. Since security system
calls are not generally called by user applications, none of the security-oriented
UNICOS calls are planned to be supported by the IRIX system.

5.6.1 UNICOS/mk and UNICOS calls not included in the supercomputing API
The following UNICOS/mk and UNICOS calls are not in the supercomputing
API:
audctl(2)

(UNICOS/mk systems only) Controls system auditing.


cmptext(2)

Compares the supplied character sequence with the privilege


text of the calling process.
fgetpal(2), fsetpal(2)

Gets or sets the privilege assignment list (PAL) and privilege


sets of a file.

SN–2211 1.0 95
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

getfacl(2), setfacl(2), rmfacl(2)

Gets, sets, or removes access control list entries for file.


getpal(2), setpal(2)

Gets or sets the privilege assignment list (PAL) and privilege


sets of a file.
getppriv(2), setppriv(2)

Gets or sets the privilege state of the calling process.


getsectab(2)

Gets security names and associated values.


getsysv(2), setsysv(2)

Gets or sets security attributes. The setsysv(2) system call is


only available on UNICOS systems.
getusrv(2), setusrv(2)

Gets or sets security validation attributes of the process.


ia_mlsuser(3C)

Determines the user’s mandatory access control (MAC)


attributes.
ia_user(3C), ia_failure(3C), ia_success(3C)

Performs user identification and authentication (I&A).


mldlist(3C), mldname(3C), mldwalk(3C)

Handles multilevel directories.


mls_create(3C), mls_dominate(3C), mls_equal(3C), mls_export(3C),
mls_extract(3C), mls_free(3C), mls_glb(3C), mls_import(3C),
mls_lub(3C)

Handles security labels.


priv_clear_file(3C), priv_clear_proc(3C), priv_dup_file(3C),
priv_free_file(3C), priv_free_proc(3C), priv_get_fd(3C),
priv_get_file(3C), priv_get_file_flag(3C), priv_get_proc(3C),
priv_get_proc_flag(3C), priv_init_file(3C), priv_init_proc(3C),

96 SN–2211 1.0
System and Library Calls [5]

priv_set_fd(3C), priv_set_file(3C), priv_set_file_flag(3C),


priv_set_proc(3C), priv_set_proc_flag(3C)

Handles process and file privilege state.


secnames(3C), secbits(3C), secnums(3C), secwords(3C)

Converts security classification bit patterns or numbers to string


and vice versa.
secstat(2), lsecstat(2), fsecstat(2)

Gets file security attributes.


setdevs(2)

Sets file security label and security flag attributes.


setfcmp(2), setfflg(2), setflvl(2)

Sets file compartments, security flags, or security level.


setucat(2), setucmp(2), setulvl(2)

Sets active categories, compartments, or security level of a


process.
slgentry(2), slgtrust(3C), slgtrustobj(3C)

Handles security log entries.

5.7 Math functions


On CRAY T90 systems with IEEE floating-point arithmetic, several functions
from the IEEE Std 754-1985 are also supported.

5.7.1 UNICOS/mk and UNICOS calls included in the supercomputing API


The Cray C compiler supports a complex data type, and the C library supports
complex versions of the main math functions. The following UNICOS/mk and
UNICOS math calls are in the supercomputing API:

SN–2211 1.0 97
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

cexp(3C), clog(3C), cpow(3C), csin(3C), ccos(3C), csqrt(3C)

Determines exponential, logarithm powers, sin, cosine, or


square root values for complex numbers. See the pow(3C),
sin(3C), and sqrt(3C) man pages.
cimag(3C), creal(3C), conj(3C)

Manipulates parts of complex values.

5.7.2 UNICOS/mk and UNICOS calls not included in the supercomputing API
The following UNICOS/mk and UNICOS math calls are not in the
supercomputing API:
feclearexcept(3C), fegetexceptflag(3C), feraiseexcept(3C),
fesetexceptflag(3C), fetestexcept(3C)

Manages IEEE floating-point exception flags.


fedisabletrap(3C), feenabletrap(3C), fegettrapflag(3C),
fesettrapflag(3C), fetesttrap(3C)

Manages IEEE trap flags.


fegetenv(3C), feholdexcept(3C), fesetenv(3C), feupdateenv(3C)

Manages the entire IEEE floating-point environment.


fegetround(3C), fesetround(3C)

Manages the rounding direction modes.


frexpf(3C), frexpl(3C), ldexpf(3C), ldexpl(3C), modfl(3C)

Manipulates parts of floating-point numbers. See the


frexp(3C) man page.

5.8 Multithreaded process support


Both the IRIX and UNICOS systems support the Pthreads functions from the
POSIX 1003.1-1996 standard. (The UNICOS system does not support all of these
functions; see page 87 the list of supported Pthreads functions.)

98 SN–2211 1.0
System and Library Calls [5]

5.8.1 UNICOS calls not included in the supercomputing API


The following calls are supported only on UNICOS systems. Only the
_tfork(2) system call is available on both the UNICOS/mk and UNICOS
systems.
_getlwpid(2), _getlwppid(2), newgetpid(2), newgetppid(2)

Gets process, process group, or parent process IDs. See the


getpid(2) man page.
_lwp_alarm(2)

Sets a thread alarm clock. See the alarm(2) man page.


_lwp_exit(2), newexit(2)

Terminates thread or process, respectively. See the exit(2) man


page.
_lwp_kill(2), _lwp_killm(2)

Sends a signal to a thread or a group of threads. See the


kill(2) man page.
mtimes(2)

Provides multitasking execution overlap profile.


resch(2)

Reschedules a thread.
_tfork(2)

Creates a multitasking thread.


t_exit(3C)

Exits multitasking thread.


tfork(3C), t_fork(3C)

Creates a multitasking sibling.


t_id(3C), t_tid(3C), t_gettid(3C)

Returns task IDs. See the tid(3C) man page.

SN–2211 1.0 99
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

t_lock(3C), t_unlock(3C), t_testlock(3C), t_nlock(3C), t_nunlock(3C),


t_ntestlock(3C)

Lock routines for multitasking. See the tlock(3C) man page.


thread(2)

Registers the process as a multithreaded process.

5.9 Networking routines


The following sections describe networking calls that are not in the
supercomputing API.

5.9.1 UNICOS/mk and UNICOS calls not included in the supercomputing API
The following UNICOS/mk and UNICOS networking calls are not in the
supercomputing API:
authdes_create(3C)

Makes a remote procedure call. See the rpc(3C) man page.


endtosent(3C), gettosbyname(3C), gettosent(3C), parsetos(3C),
settosent(3C)

Gets network type of service information.


gethost(3C), gethostlookup(3C)

Gets a network host entry.


inet_subnetmaskof(3C), inet_subnetof(3C)

Manipulates Internet address. See the inet(3C) man page.


nsecctl(2)

Accesses or manipulates network security information.


rcmdexec(3C)

Returns a stream to a remote command.

100 SN–2211 1.0


System and Library Calls [5]

setportbm(2), getportbm(2)

Sets or gets the kernel memory port bit map.

5.10 Miscellaneous calls


The following sections describe miscellaneous calls that are currently available
on the UNICOS system, but not on the IRIX system.

5.10.1 UNICOS/mk and UNICOS calls that are being ported to the IRIX system and are included in the
supercomputing API
The following UNICOS/mk and UNICOS calls are in the supercomputing API:
catmsgfmt(3C) Formats an error message.

5.10.2 UNICOS/mk and UNICOS calls that are being ported to the IRIX system and are not included in
the supercomputing API
The following UNICOS/mk and UNICOS calls are not in the supercomputing
API:
catgetmsg(3C) Reads a message from a message catalog.

5.10.3 UNICOS/mk and UNICOS calls not included in the supercomputing API
The following UNICOS/mk and UNICOS calls are not in the supercomputing
API:
airlog(3C)

Logs messages to system log using syslog(3C).


atabort(3C)

Calls specified function on abnormal termination. See the


atexit(3C) man page.
bsdsignal(2)

Changes action associated with a signal.

SN–2211 1.0 101


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

bsdsigpause(2)

Releases blocked signals and waits for interrupt.


cpused(3C)

Gets task CPU time in real-time clock (RTC) ticks.


cutimes(2)

(UNICOS systems only) Updates user execution time.


daemon(3C)

Runs an application in the background.


dupmntent(3C), findmntentry(3C), freemntent(3C), freemntlist(3C),
getmntinfo(3C), listmntent(3C)

Gets file system descriptor file entry or kernel mount table


entry. See the getmntent(3C) man page.
_fcdtocp(3C), _fcdlen(3C), _btol(3C), _ltob(3C)

Passes character strings and logical values between Standard C


and Fortran. See the _cptofcd(3C) man page.
fgetln(3C), fgetsn(3C)

Gets a string from a stream (undocumented).


getconfval(3C), getconfvals(3C), freeconfval(3C)

Gets file system descriptor file entry.


getfsent(3C), getfsspec(3C), getfsfile(3C), getfstype(3C),
setfsent(3C), endfsent(3C)

Gets configuration values.


getinfo(2)

Gets specified user, job, or process signal information.


getinfomsg(3C)

Returns messages associated with getinfo(2) values


(undocumented).

102 SN–2211 1.0


System and Library Calls [5]

getmount(2)

Returns information about the kernel mount table.


getoptlst(3C)

Gets option argument list.


getusershell(3C), setusershell(3C), endusershell(3C)

Gets user shells.


guestctl(2)

(UNICOS systems only) Controls and reports the status of


major guest system functions.
killm(2)

Sends a signal to a process or a group of processes.


loaded(3C), loaded_data(3C)

Tells whether soft external routine/data is loaded.


logname(3C)

Returns the login name of the user.


malloc_brk(3C), malloc_check(3C), malloc_error(3C),
malloc_expand(3C), malloc_extend(3C), malloc_howbig(3C),
malloc_inplace(3C), malloc_isvalid(3C), malloc_limit(3C),
malloc_space(3C), malloc_stats(3C)

Provides memory management functions. See the malloc(3C)


man page.
memwcpy(3C), memwset(3C), memstride(3C), memwchr(3C), memwcmp(3C)

Performs word-oriented memory operations. See the


memword(3C) man page.
nicem(2)

Changes priority of processes.


pathname(3C)

Computes a true path name from a specified path.

SN–2211 1.0 103


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

ptyrecon(2)

Manages pty reconnection.


rtclock(3C)

Gets current real-time clock (RTC) reading.


sbreak(2)

Changes data segment space allocation. See the brk(2) man


page.
setenv(3C), unsetenv(3C)

Sets or removes the value of an environment variable.


setloghost(3C), setlogname(3C), setlogport(3C)

Controls system log. See the syslog(3C) man page.


shfree(3C), shrealloc(3C), shmalloc_nb(3C), shfree_nb(3C),
shrealloc_nb(3C), shmalloc_check(3C), shmalloc_stats(3C)

(UNICOS/mk systems only) Are shared heap memory


management functions. See the shmalloc(3C) man page.
sigctl(2)

Provides generalized signal control.


sigoff(3C), sigon(3C)

Controls signal-catching status.


snprintf(3C), vsnprintf(3C)

Prints formatted output (undocumented).


strnstrn(3C), strnrstrn(3C), strrstr(3C)

Performs string operations. See the string(3C) man page.


strtof(3C), strtold(3C)

Converts string to float/long double. See the strtod(3C) man


page.

104 SN–2211 1.0


System and Library Calls [5]

suspend(2), resume(2)

Controls execution of processes.


tabinfo(2), tabread(2)

Returns information on and reads a system table.


upanic(2)

Stops the system from a user process.

5.11 Individual system call differences


Most of the supercomputing API system and library calls supported on the
UNICOS/mk and UNICOS systems and on the IRIX system are compatible.
This study uses the information in the UNICOS/mk and IRIX man pages to
compare some of the system call entries.
This comparison examines the differences only at the programming interface
level. It is assumed that users will recompile their programs using the IRIX
system includes. Therefore, varying values for symbolic defines for the systems
will not be an issue. Use of UNICOS/mk or UNICOS specific constants or data
fields in structures should be flagged by the compiler as well. Use of a
hard-coded value rather than its symbolic define in a program will prevent the
intended action from being carried out. The compiler will not detect any
hard-coded values, and such values may cause run-time errors.

5.11.1 UNICOS/mk and UNICOS differences


Most of the system call differences noted are in the area of file access and
control, such as access(2), fcntl(2), and open(2). Some of these
hardware-dependent differences will be eliminated when support ends for the
specific storage devices or machine architectures.
Additional data fields in the stat(2) structure are another area of concern.
The UNICOS/mk and UNICOS systems support the following additions to the
system calls listed.
access(2)

CRI only mode-bits:


G_OK checks for set-gid bit, and

SN–2211 1.0 105


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

U_OK checks for set-uid bit.


fcntl(2)

CRI only command flags:


F_SETSB

Sets the sitebits field in the inode for


fildes to the value specified in the arg
argument.
F_SETALF

Adds the allocation flag bits specified by the


value of the arg argument to any existing
allocation flag bits.
F_CLRALF

Removes the allocation flag bits specified by the


value of the arg argument to any existing
allocation flag bits.
F_GETXT

Gets address extent information from the inode


for the fildes argument.
open(2)

CRI only open flags:


O_RAW, O_LDRAW

If a flag is set, the call reads or writes whole


sectors of data into user space, bypassing
system buffer and logical device cache. The
system usually does automatic read-ahead and
write-behind to improve performance.
The IRIX system provides similar O_DIRECT,
but it is only supported on local EFS and XFS
file systems.

106 SN–2211 1.0


System and Library Calls [5]

O_BIG

Allows a user to specify that a file is big when


it is created, rather than wait for the file to
grow large enough for the system to categorize
it as big.
O_PLACE

If the file specified by path does not exist, the


cbits and cblks parameters are used to
establish file system partition residency and the
number of blocks allocated in each partition.
O_RESTART

If O_RESTART and O_CREAT and the process


has appropriate privilege, the file is created as a
restart file.
O_SSD

If this flag is set, all subsequent I/O is done


from the user’s secondary data segment (SDS)
memory instead of main memory.
O_T3D

Controls memory usage when the high-speed


channel connects the I/O subsystem (IOS) and
CRAY T3D system. If this flag is set, all
subsequent I/O is performed from the user’s
CRAY T3D memory instead of secondary data
segments or the main memory of the Cray host
system.
O_WELLFORMED

Is used with O_RAW to force read and write


requests that are not well-formed to fail.
O_SFS_DEFER_TM

This flag is valid only for shared file systems


(SFSs). It can reduce file system overhead by
declaring to the kernel that updates to file

SN–2211 1.0 107


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

inode time stamps may be done less frequently


than they otherwise would.
O_SFSXOP

This flag grants exclusive open lock on an SFS


file system.
profil(2)

Generates an execution time profile. The UNICOS/mk and


UNICOS type and count arguments do not match the IRIX type
and count arguments.
ptrace(2)

Traces processes. This call supports additional values for the


request argument: 10 and 11.
quotactl(2)

Manipulates file system quotas. The UNICOS/mk and


UNICOS type and count arguments do not match the IRIX type
and count arguments.
socket(2)

Creates an endpoint for communication. The UNICOS/mk and


UNICOS arguments for address family, af, and type, type, are
defined differently from the IRIX defines.
stat(2), lstat(2), fstat(2)

Gets file status. The UNICOS/mk and UNICOS stat structure


contains additional fields. These are used for accounting ID,
reference count, I/O related blocking and sizing, data
migration, and security.

108 SN–2211 1.0


Environment Variables [6]

This chapter describes the environment variables for Fortran, C, and C++. The
chapter is organized as follows;
• Fortran environment variables (see Section 6.1, page 109).
• C and C++ environment variables (see Section 6.2, page 111).

6.1 Fortran environment variables


This section is organized as follows:
• Environment variables that are part of the supercomputing application
programming interface (API) (see Section 6.1.1, page 109).
• CF90 environment variables that are not included in the supercomputing
API (see Section 6.1.2, page 110).

6.1.1 Environment variables included in the supercomputing API


The environment variables described in this section are ordered as follows:
• New environment variables in support of a new set of parallel directives
(see Section 6.1.1.1, page 109).
• Miscellaneous environment variables that are part of the supercomputing
API (see Section 6.1.1.2, page 109).

6.1.1.1 Environment variables for parallel applications


Note: Due to nondisclosure agreements, this document cannot describe the
new environment variables for parallel applications until the process of
defining them is complete. They will be described in a future update.

6.1.1.2 Miscellaneous environment variables in the supercomputing API


The following environment variables are included in the supercomputing API:
LISTIO_PRECISION Controls the number of digits of precision printed
by list-directed output.

SN–2211 1.0 109


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

MSG_FORMAT Specifies the message format to use to alter


message displays.
NLSPATH Affects compiler interactions with the message
system.

6.1.2 CF90 environment variables not included in the supercomputing API


The following environment variables are specific to CF90 and are not a part of
the supercomputing API:
• Environment variables for parallel applications (see Section 6.1.2.1, page 110).
• Miscellaneous environment variables (see Section 6.1.2.2, page 110).

6.1.2.1 Parallel applications


The following Cray Research environment variables are supported on Cray PVP
parallel systems but are not part of the supercomputing API:
MP_DEDICATED Specifies that you are the only user on the system
(Autotasking).
MP_HOLDTIME Specifies the number of clock periods to hold a
processor before giving up the CPU
(Autotasking).
MP_SAMPLE Specifies the sample rate at which the ready mask
is read while in the hold loop (Autotasking).
MP_SLVSIN Specifies the stack increment for microtasking or
Autotasking slave processes.
MP_SLVSSZ Specifies the initial task size for microtasking or
Autotasking slave processes.

6.1.2.2 Miscellaneous
The following miscellaneous environment variables are not included in the
supercomputing API:
AUXBUF Specifies the number of buffers, for auxiliary
arrays, that are held in memory.
AUXPAGE Specifies the size of each AUX buffer.

110 SN–2211 1.0


Environment Variables [6]

CRI_F90_OPTIONS Specifies additional options to be attached to the


command line.
LD_LIBRARY_PATH Specifies which directories are to be searched for
libraries.
NPROC Specifies the maximum number of processes that
can run in the background.
STACKSIZE Specifies the stack size for Autotasking slaves.
TARGET Specifies the type of machine upon which the
code will be executed.
TMPDIR Names a directory to contain temporary files.

6.2 C and C++ environment variables


The environment variables for C and C++ are defined in the following
publications:
• Cray C/C++ Reference Manual, publication SR–2179
No C or C++ environment variables are currently defined for the
supercomputing API. The following are not in the supercomputing API:
• Cray Research C and C++ environment variables (see Section 6.2.1, page 111).

6.2.1 Cray Research C and C++ environment variables not included in the supercomputing API
The Cray Research C and C++ environment variables that are not part of the
supercomputing API are as follows:
CRI_cc_OPTIONS, Specifies command-line options that are applied
CRI_c89_OPTIONS, to all compilations using the respective compiler.
CRI_cpp_OPTIONS, Options specified by these environment variables
and CRI_CC_OPTIONS are added following the options specified directly
on the command line. This is especially useful for
adding options to compilations done with build
tools.
LANG Identifies your requirements for native language,
local customs, and coded character set with
regard to compiler messages.
MSG_FORMAT Controls the format in which you receive
compiler messages. (The Cray message system is

SN–2211 1.0 111


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

implemented in the supercomputing API for


Silicon Graphics Fortran but not for C or C++.)
NLSPATH Specifies the message system catalogs that should
be used. (The Cray message system is
implemented in the supercomputing API for
Silicon Graphics Fortran but not for C or C++.)
NPROC Specifies the number of processes used for
simultaneous compilations. The default is 1.
TARGET Specifies type and characteristics of the hardware
on which you are running. You can also set the
TARGET environment variable to the
characteristics of another Cray Research system to
cross-compile source code for that system. See the
target(1) and sh(1) man pages for more
information.

112 SN–2211 1.0


Interlanguage Communication [7]

This chapter describes methods of communicating between Fortran and C.


Currently, the fortran keyword is the only feature defined, and it is included
in the supercomputing API. Additional features will be defined in the future.
The interlanguage communication mechanisms are currently under discussion.
Several decisions have been made on direction. The burden for interlanguage
communication will be on the calling routine, not on the called routine.
Mechanisms will be implemented that allow existing libraries and procedures to
be called from languages other than the language in which the library or
procedure is written without modification.

7.1 Cray Research extensions in the supercomputing API


The fortran keyword will be used in C to declare external functions as having
Fortran characteristics:
fortran keyword (C Specifies a storage class that can be used to
only) declare a Fortran-coded external function. The
use of the fortran keyword when declaring a
function causes the compiler to verify that the
arguments used in each call to the function are
pass-by-address; any arguments that are not
addresses are converted to addresses.
Additional decisions must be made for C on items such as the handling of
character strings.
C++ will implement an extern fortran keyword, which will prevent the
C++ compiler from performing name mangling and causing it to use Fortran
conventions in calling a Fortran routine.
As of the Mongoose 7.2 release and the Cray Programming Environment 3.0
release, the MIPSpro Fortran 90 compiler and the Cray CF90 compiler support a
%VAL intrinsic, which can be used in an argument list to pass a scalar argument
by value rather than by reference. The CDIR$ NAME name =string directive
allows programmers to specify any sequence of characters (string) to be
substituted for the Fortran identifier (name), allowing Fortran programmers to
call non-Fortran routines without the use of a wrapper routine. When passing
character constants, the Silicon Graphics Fortran compilers will guarantee
character constants are terminated by a null character.

SN–2211 1.0 113


Index

$, 10 amax0, 64
@, 10 amax1, 64
_ _unix, 43 amin0, 64
amin1, 64
amod, 64
A AND, 24
AND, bitwise
a64l, 85 on reals and integers, 14
ABORT, 52 APUTWA, 58
abs, 63 AQCLOSE, 57
access, 105 AQIO, 57
Account IDs, 89 AQOPEN, 57
Account records, 89 AQREAD, 57
Accounting AQREADC, 57
( See System and library calls ), 89 AQSTAT, 57
acctctl, 89 AQWRITE, 57
acctid, 89 _argcount, 41
acid2nam, 89 Arithmetic, pointer
acidnamfree, 89 differences, 12
acos, 63 Array
_ADDR32, 44 format identifier, 15
_ADDR64, 44 partial initialization, 18
addudb, 89 Array reference, 13
aimag, 63 Arrays
aint, 63 assumed-size as internal file, 14
aio_cancel, 91 ASCDC, 54
aio_error, 91 asctime_r, 87
aio_fsync, 91 asgcmd, 46
aio_hold, 91 asin, 63
aio_read, 91 assign, 45, 49, 52
aio_return, 91 Assignments, 14
aio_suspend, 91 Assignments, Fortran
aio_write, 91 ( See Language extensions ), 13
airlog, 101 Assumed-size array
alarm, 99 Fortran, 14
ALIGN, 20 Asterisk
align, 36 edit descriptor, 18
alog, 63 ASYNCDR, 57
alog10, 63 Asynchronous I/O
ALOG_V, 65
SN–2211 1.0 115
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

aio, 91 Basic Linear Algebra Subprograms


bufa FFIO layer, 47 ( See BLAS ), 66
BUFFER IN/BUFFER OUT, 14 bcmp, 85
cachea FFIO layer, 47 bcopy, 85
ASYNCMS, 58 Binary constants, 11
atabort, 101 Bit matrix
atan, 63 clear loaded bit, 28
atan2, 64 load and multiply, 28
atexit, 101 loading, 28
Atomic memory routines returns bit matrix product, 28
( See Routines ), 77 unloads bit matrix product, 28
audctl, 95 Bit-level operations, 13
authdes_create, 100 BITVEC, 60
AUTOMATIC attribute, 11 BITVECM, 60
Fortran, 11 Bitwise intrinsic procedures
Autotasking, 19, 21, 110 ( See Intrinsic procedures ), 24
directives BL, 20
CASE, 22 BLAS
CNCALL, 23 nonstandard, 67
DO ALL, 23 sparse, 70
DO PARALLEL, 23 standard, 66
END CASE, 22 BLOCK DATA units
END DO, 23 number allowed, 15
END GUARD, 23 BLOCKDATA subprogram, 13
END PARALLEL, 23 bmx, 47
GUARD, 23 Boolean constants, 11
MAXCPUS, 23 Boolean masking expressions, 13
NUMCPUS, 23 Boolean variables, 11
PARALLEL, 23 Bottom loading
PARALLEL DO, 23 standard/safe toggle, 20
PERMUTATION, 23 BOUNDS, 20
AUX, 110 bounds, 36
AUXBUF, 110 Bounds checking
AUXPAGE, 110 toggle, 20
BOZ constants, 11
brk, 85, 104
B bsdsignal, 101
bsdsigpause, 102
B2OCT, 54 _btol, 102
BARASGN, 56 bufa, 47
BARREL, 56 BUFDUMP, 56
Barrier routines buffer I/O, 14
( See also Routines ), 76 BUFFER IN, 14, 25, 26
BARSYNC, 56
116 SN–2211 1.0
Index

BUFFER OUT, 14, 25, 26 _setvm, 41


BUFPRINT, 56 _write_memory_barrier, 42
BUFTUNE, 56 _writeSB, 42
BUFUSER, 56 _writeST, 42
Built-in functions, 39 bzero, 85
included in API
_dshiftl, 40
_dshiftr, 40 C
_gbit, 40
_gbits, 40 C/C++, 5
_int_mult_upper, 40 API, 33
_leadz, 40 language extensions, 33
_mask, 40 cabs, 63
_maskl, 40 cache, 47
_maskr, 40 Cache management routines
_my_pe, 40 ( See Routines ), 80, 81
_num_pes, 40 CACHE_ALIGN, 20
_pbit, 40 cache_align, 36
_pbits, 40 CACHE_BYPASS, 20
_popcnt, 40 cache_bypass, 36
_poppar, 40 cachea, 47
_rtc, 41 can_instantiate, 35
not included in API CASE, 20, 22
_argcount, 41 case, 39
_cmr, 41 catgetmsg, 101
_EX, 41 catmsgfmt, 101
_getvm, 41 CBRT, 65
_mclr, 41 ccos, 64, 98
_memory_barrier, 42 CDABS, 30
_mld, 41 CDC2CRAY, 54
_mldmx, 41 CDCOS, 30
_mmx, 41 CDEXP, 30
_mul, 41 CDIR$ VFUNCTION, 65
_numargs, 41 CDLOG, 30
_ranf, 41 CDSIN, 30
_readSB, 42 CDSQRT, 30
_readSR, 42 cexp, 64, 98
_readST, 42 chacid, 92
_remote_write_barrier, 42 char, 64
_semclr, 42 Character constant use, 11
_semget, 42 Character set extensions, Fortran
_semput, 42 included in API, 10
_semset, 42 CHCONV, 54
_semts, 42
SN–2211 1.0 117
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

chdiri, 92 N$PES, 28
CHECKDR, 57 Constants
CHECKMS, 58 complex literal, 12
Checkpoint feature, 93 Hollerith, 12
chkpnt, 93 typeless, 11
chmem, 94 Continuation lines
cimag, 98 Fortran, 10
CLEAR_IEEE_EXCEPTION, 26 Control Data conversion procedures
CLEARBT, 60 ( See Routines ), 54
CLEARFI, 60 Conversion
CLOC, 12, 28 ( See Routines ), 54
CLOCK, 30 Convolution, 68
clog, 63, 98 COPY_ASSUMED_SHAPE, 20
CLOSDR, 57 cos, 47, 64
closelog, 85 COS_V, 65
CLOSMS, 58 cosh, 64
cmplx, 64 COSS, 65
cmptext, 95 COSS_V, 65
_cmr, 41 COT, 25
CNCALL, 19, 23 cpow, 98
Comma placement, 17 cpselect, 94
Commands _cptofcd, 102
included in API cpused, 102
assign, 45 CRAY, 43
explain, 46 cray, 43
not included in API Cray convolution, 68
asgcmd, 46 Cray direct sparse, 68
fdcp, 46 Cray distributed FFT, 68
COMMON, 20 Cray FFT, 69
common, 36 Cray Fortran extensions
Common block, 12 ( See also Routines ), 53
multiple declarations, 13 ( See Routines ), 62
variable, 17 Cray Fortran routines
Common Cray and MIPSpro Fortran extensions ( See also Routines ), 60
not in supercomputing API, 17 ( See Routines ), 63
Compiler directives, 10 Cray linear recurrence, 69
COMPL, 24 Cray pointers, 12
complex (C only), 34 Cray sorting and searching, 69
Complex literal constant, 12 CRAY1, 43
CONCURRENT, 20 _CRAY1, 43
conj, 98 CRAY2CDC, 54
conjg, 64 CRAY2CRI, 55
Constant CRAY2ETA, 54
not included in API
118 SN–2211 1.0
Index

CRAY2IBD, 54 dasin, 63
CRAY2IBM, 54 DATA, 18
CRAY2IEG, 55 Data declarations
CRAY2NVE, 54 type, 12
CRAY2VAX, 56 using asterisk for type precision, 12
_CRAY, 43 Data migration facility (DMF)
_CRAYC, 44 ( See System and library calls ), 94
CRAYDUMP, 59 Data objects, 13
_CRAYIEEE, 43 Data objects, Fortran
_CRAYMPP, 43 ( See Language extensions ), 11
_CRAYT3E, 43 DATA statement, 13
creal, 98 Data types
CRI2CRAY, 55 DOUBLE COMPLEX statement, 18
CRI2CRY, 56 datan, 63
CRI2IBM, 52 datan2, 64
CRI2IEG, 52 DATE, 30
CRI2IEG_77, 55 DATE_AND_TIME, 30
CRI2IEU, 52 dble, 64
CRI_c89_OPTIONS, 111 DCMPLX, 30
CRI_CC_OPTIONS, 111 DCONJG, 30
CRI_cc_OPTIONS, 111 dcos, 64
CRI_cpp_OPTIONS, 111 dcosh, 64
CRI_F90_OPTIONS, 111 DCOT, 30
CRI_IEEE_DEFINITIONS, 31 ddim, 64
CRYCRI, 56 Declarations
csin, 64, 98 Fortran
CSMG, 25 included in API, 11
csqrt, 64, 98 DECODE, 18
ctime_r, 87 deleteudb, 89
cutimes, 102 devacct, 91
CVMGM, 25 Device accounting, 89
CVMGN, 25 dexp, 64
CVMGT, 25 DFLOAT, 30
CVMGZ, 25 dim, 64
CVMPG, 25 DIMAG, 30
dint, 63
Direct sparse, 68
D Directives
( See also Functions ), 65
D edit descriptor, 15 common in API, 19
dabs, 63 Fortran, 18
dacct, 91 Fortran sentinels, 10
dacos, 63 included in API
daemon, 102
SN–2211 1.0 119
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

CNCALL, 19 NOPATTERN, 21
EJECT, 19 NORECURRENCE, 21
FIXED, 19 NOSPLIT, 21
FREE, 19 NOUNROLL, 22
ID, 19 NOVECTOR, 22
IVDEP, 19 NOVSEARCH, 22
LIST, 19 NUMCPUS, 23
NAME, 19 PARALLEL, 23
NOLIST, 19 PATTERN, 21
PERMUTATION, 20 PERMUTATION, 23
not included in API PREFERTASK, 21
ALIGN, 20 PREFERVECTOR, 21
BL, 20 RECURRENCE, 21
BOUNDS, 20 SHORTLOOP, 21
CACHE_ALIGN, 20 SHORTLOOP128, 21
CACHE_BYPASS, 20 SPLIT, 21
CASE, 20, 22 STACK, 22
CNCALL, 23 SUPPRESS, 22
COMMON, 20 SYMMETRIC, 22
CONCURRENT, 20 TASK, 22
COPY_ASSUMED_SHAPE, 20 UNROLL, 22
DO ALL, 23 USES_EREGS, 22
DO PARALLEL, 23 VECTOR, 22
END CASE, 22 VFUNCTION, 22
END DO, 23 VSEARCH, 22
END GUARD, 23 #pragma
END PARALLEL, 23 ( See #pragma directives ), 34
END_CASE, 20 DISABLE_IEEE_INTERRUPT, 26
FLOW, 20 Distributed FFT, 67
GUARD, 23 dlog, 63
INLINE, 21 dlog10, 63
INLINE ALWAYS, 21 dmax1, 64
INLINE NEVER, 21 DMF
INTEGER, 21 ( See System and library calls ), 94
MAXCPUS, 23 dmf_hashandle, 95
MODINLINE, 21 dmf_offline, 95
NEXTSCALAR, 21 dmf_vendor, 95
NO INTERCHANGE, 21 dmin1, 64
NO SIDE EFFECTS, 21 dmmode, 95
NOBL, 20 dmod, 64
NOBOUNDS, 20 dmofrq, 95
NOFLOW, 20 DO ALL, 23
NOINLINE, 21 DO loop
NOMODINLINE, 21
120 SN–2211 1.0
Index

single iteration, 17 ELEMENTAL, 16


transferring into, 16 ENABLE_IEEE_INTERRUPT, 26
DO PARALLEL, 23 ENCODE, 18
DO variable END, 10
implied, 16 END CASE, 22
do_not_instantiate, 35 END DO, 23
Dollar sign END GUARD, 23
edit descriptor, 18 END PARALLEL, 23
DOUBLE COMPLEX, 18 END statement
DREAL, 30 Fortran, 10
DRIO, 57 End-of-file, 15
DSASC, 54 END_CASE, 20
DSHIFTL, 24 endcase, 39
_dshiftl, 40 endfsent, 102
DSHIFTR, 24 endgrent, 85
_dshiftr, 40 endguard, 39
dsign, 64 endloop, 39
dsin, 64 endparallel, 39
dsinh, 64 endpwent, 85
dsqrt, 64 endtosent, 100
dtan, 65 endudb, 89
dtanh, 65 endusershell, 103
duplicate, 37 Environment variables
dupmntent, 102 C/C++, 111
dynamic variables included in API
Fortran, 11 LISTIO_PRECISION, 109
MSG_FORMAT, 110
NLSPATH, 110
E not included in API
AUXBUF, 110
E-registers, 22 AUXPAGE, 110
ecvt, 85 CRI_c89_OPTIONS, 111
Edit descriptor CRI_CC_OPTIONS, 111
/, 18 CRI_cc_OPTIONS, 111
edit descriptor CRI_cpp_OPTIONS, 111
slash, preceded by count, 18 CRI_F90_OPTIONS, 111
Edit descriptors, 14 LANG, 111
$, 18 LD_LIBRARY_PATH, 111
*, 18 MP_DEDICATED, 110
D, 15 MP_HOLDTIME, 110
Dw.dEe, 15 MP_SAMPLE, 110
Rw, 18 MP_SLVSIN, 110
EISPACK, 69 MP_SLVSSZ, 110
EJECT, 19
SN–2211 1.0 121
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

MSG_FORMAT, 111 fast_shmem_short_inc, 78


NLSPATH, 112 _FASTMD, 44
NPROC, 111, 112 FCD, 28
STACKSIZE, 111 _fcdlen, 102
TARGET, 111, 112 _fcdtocp, 102
TMPDIR, 111 fchmod, 85
Equivalencing, 13 fchown, 85
EQV, 24 fcntl, 106
erf, 64 fcvt, 85
erfc, 64 fd, 48
ERREXIT, 60 fdcp, 46
ETA2CRAY, 54 feclearexcept, 98
EVASGN, 62 fedisabletrap, 98
EVCLEAR, 62 feenabletrap, 98
event, 47 fegetenv, 98
EVPOST, 62 fegetexceptflag, 98
EVREL, 62 fegetround, 98
EVTEST, 62 fegettrapflag, 98
EVWAIT, 62 feholdexcept, 98
_EX, 41 feraiseexcept, 98
exctl, 94 fesetenv, 98
Execution control fesetexceptflag, 98
Fortran extensions fesetround, 98
( See Language extensions ), 16 fesettrapflag, 98
EXIT, 52 fetestexcept, 98
exit, 99 fetesttrap, 98
exp, 64 feupdateenv, 98
EXP_V, 65 ffbksp, 48
explain, 46 ffbkspf, 48
Expressions, 14 ffclose, 49
restricted, 13 ffclosef, 49
Expressions, Fortran fffcntl, 49
( See Language extensions ), 13 FFIO
Extensions, 113 ( See also Layers of FFIO ), 47
fortran keyword, 113 ffopen, 49
ffopenf, 49
ffopens, 49
F ffpos, 49
ffread, 48, 49
f77, 47 ffreada, 49
Fast Fourier Transforms ffreadf, 48, 49
( See FFT ), 67 ffs, 85
FAST_SHMEM_INT4_INC, 77 ffseek, 49
fast_shmem_short_finc, 78
122 SN–2211 1.0
Index

ffseekf, 49 commas disallowed, 17


ffsetsp, 49 use of commas, 17
FFT, 67, 68 use of parentheses, 15
ffweod, 49 Format identifier
ffweodf, 49 array in I/O statement, 15
ffweof, 49 FORMAT statements, 14
ffweoff, 49 Formatting list, 15
ffwrite, 49 Fortran, 5
ffwritea, 49 API, 9
ffwritef, 49 fortran, 34
fgetln, 102 FORTRAN 77
fgetpal, 95 subroutines, 67
fgetsn, 102 Fortran 90 standard, 9
findmntentry, 102 Fortran applications library, 46
FINDMS, 58 Fortran directives, 18
FISGCTL, 59 Fortran intrinsic procedures
FIXED, 19 ( See Intrinsic procedures ), 23
Fixed form line length, 11 fortran keyword, 113
fjoin, 92 Fortran language elements, 9
Flags Fortran library, 6
F_CLRALF, 106 Fortran subroutines, 69
F_GETXT, 106 Fortran utility subroutines
F_SETALF, 106 ( See Routines ), 52
F_SETSB, 106 Fortran, Silicon Graphics
O_BIG, 107 definition, 9
O_LDRAW, 106 Fourier transforms, 67
O_PLACE, 107 FP6064, 54
O_RAW, 106 FP6460, 54
O_RESTART, 107 FREE, 19
O_SFS_DEFER_TM, 107 freeconfval, 102
O_SFSXOP, 108 freemntent, 102
O_SSD, 107 freemntlist, 102
O_T3D, 107 frexp, 98
O_WELLFORMED, 107 frexpf, 98
Flexible file I/O, 47 frexpl, 98
float, 64 fsecstat, 97
flockfile, 87 fsetpal, 95
FLOW, 20 fstat, 108
Flow tracing fstatvfs, 85
toggles, 20 FSUP, 57
FLOWMARK, 59 FSUPC, 57
Foreign dataset conversion routines FTN_IEEE_DEFINITIONS, 31
( See Routines ), 52 ftok, 85
Format descriptors
SN–2211 1.0 123
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

ftruncate, 85 gcvt, 85
ftrylockfile, 87 get routines
Function ( See also Routines ), 73, 82
%VAL, 113 strided
function reference ( See also Routines ), 75
in I/O list, 15 GET_IEEE_EXCEPTIONS, 26
Functions, 65 GET_IEEE_INTERRUPTS, 26
( See also Built-in functions ), 39 GET_IEEE_ROUNDING_MODE, 27
included in API GET_IEEE_STATUS, 27
ffbksp, 48 GETARG, 60
ffbkspf, 48 getc_unlocked, 87
ffclose, 49 GETCALLERINFO, 59
ffclosef, 49 getchar_unlocked, 87
fffcntl, 49 getconfval, 102
ffopen, 49 getconfvals, 102
ffopenf, 49 GETCPUS, 60
ffopens, 49 GETCWD, 60
ffpos, 49 getdevn, 92
ffread, 49 getdtablesize, 85
ffreada, 49 getfacl, 96
ffreadf, 49 getfsent, 102
ffseek, 49 getfsfile, 102
ffseekf, 49 getfsspec, 102
ffsetsp, 49 getfstype, 102
ffweod, 49 getgrent, 85
ffweodf, 49 getgrgid_r, 87
ffweof, 49 getgrnam_r, 87
ffweoff, 49 GETHOST, 61
ffwrite, 49 gethost, 100
ffwritea, 49 gethostid, 85
ffwritef, 49 gethostlookup, 100
not included in API getinfo, 102
CBRT, 65 getinfomsg, 102
COSS, 65 getjtab, 90
SNGLR, 66 getlim, 90
funlockfile, 87 getlogin_r, 87
_getlwpid, 99
_getlwppid, 99
G getmntent, 102
getmntinfo, 102
GAMMA, 58 getmount, 103
GATHER, 70 GETNAMEQ, 59
_gbit, 40 GETOARGC, 60
_gbits, 40
124 SN–2211 1.0
Index

getoptlst, 103 H
getpal, 96
getpermit, 90 Hardware interface calls
getpgid, 85 ( See System and library calls ), 93
getpid, 99 HCOS_V, 65
GETPMC, 61 HCOSS_V, 65
getportbm, 101 Hexadecimal constants, 11
GETPOS, 28 Hexadecimal floating-point constants (C only), 34
getppriv, 96 HEXP_V, 65
getpwent, 85 HLOG_V, 65
getpwnam_r, 87 Hollerith constants, 12
getpwuid_r, 87 HPALLOC, 58
getsectab, 96 HPCHECK, 58
getsysudb, 89 HPCLMOVE, 58
getsysv, 96 HPDEALLC, 58
gettimeofday, 85 HPDUMP, 58
gettosbyname, 100 HPNEWLEN, 58
gettosent, 100 HPSHRINK, 58
gettrustedudb, 89 HSIN_V, 65
getudb, 89 HSQRT_V, 65
getudbchain, 89 HSQRTINV_V, 65
getudbdefault, 89 HTOR_VV, 65
getudbnam, 89
getudbstat, 89
getudbtmap, 89 I
getudbuid, 89
getusershell, 103 I/O
getusrv, 96 asynchronous, 91
GETVARG, 60 Fortran extensions, 14
GETVARGC, 60 list, 91
_getvm, 41 I/O routines
GETWA, 58 ( See Routines ), 57
getwd, 85 I/O unit, 17
gid2nam, 89 ia_failure, 96
gidnamfree, 89 ia_mlsuser, 96
global, 48 ia_success, 96
gmtime_r, 87 ia_user, 96
GTSTDPTR, 61 iabs, 63
GUARD, 23 ialloc, 92
guard, 39 IARGC, 60
guestctl, 103 IBD2CRAY, 54
ibm, 48
IBM conversion procedures

SN–2211 1.0 125


Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

( See Routines ), 54 TEST_IEEE_INTERRUPT, 28


IBM2CRAY, 54 system module
IBM2CRI, 52 CRI_IEEE_DEFINITIONS, 31
ICEIL, 58 FTN_IEEE_DEFINITIONS, 31
ichar, 64 IEEE standard
ICPUSED, 57 floating-point arithmetic, 97
ICRITADD, 57 IEEE_BINARY_SCALE, 27
ICRITMUL, 57 IEEE_CLASS, 27
ID, 19 IEEE_COPY_SIGN, 27
id2nam, 89 IEEE_EXPONENT, 27
ident, 35 IEEE_FINITE, 27
idim, 64 IEEE_INT, 27
idint, 64 IEEE_IS_NAN, 27
idnint, 64 IEEE_NEXT_AFTER, 27
IEEE arithmetic IEEE_REAL, 27
intrinsic procedures, 26 IEEE_REMAINDER, 27
IEEE conversion procedures IEEE_UNORDERED, 27
( See Routines ), 55 IEG2CRAY, 55
IEEE floating-point arithmetic IEG2CRI, 52
intrinsic procedures IEG2CRI_77, 55
CLEAR_IEEE_EXCEPTION, 26 IEU2CRI, 52
DISABLE_IEEE_INTERRUPT, 26 IF block
ENABLE_IEEE_INTERRUPT, 26 transferring into, 16
GET_IEEE_EXCEPTIONS, 26 ifix, 64
GET_IEEE_INTERRUPTS, 26 IGTBYT, 61
GET_IEEE_ROUNDING_MODE, 27 IHPLEN, 58
GET_IEEE_STATUS, 27 IHPSTAT, 58
IEEE_BINARY_SCALE, 27 IHPVALID, 58
IEEE_CLASS, 27 index, 64, 85
IEEE_COPY_SIGN, 27 inet, 100
IEEE_EXPONENT, 27 inet_subnetmaskof, 100
IEEE_FINITE, 27 inet_subnetof, 100
IEEE_INT, 27 Initialization, 13
IEEE_IS_NAN, 27 Initialization statements
IEEE_NEXT_AFTER, 27 Fortran, 12
IEEE_REAL, 27 INLINE, 21
IEEE_REMAINDER, 27 inline, 35
IEEE_UNORDERED, 27 INLINE ALWAYS, 21
SET_IEEE_EXCEPTION, 27 INLINE NEVER, 21
SET_IEEE_EXCEPTIONS, 27 Inlining
SET_IEEE_INTERRUPTS, 27 forces, 21
SET_IEEE_ROUNDING_MODE, 28 module procedures, 21
SET_IEEE_STATUS, 28 suppresses, 21
TEST_IEEE_EXCEPTION, 28
126 SN–2211 1.0
Index

toggles, 21 OR, 25
Input POPCNT, 25
list-directed, 15 POPPAR, 25
insque, 85 SHIFTA, 25
instantiate, 35 SHIFTL, 25
int, 64 SHIFTR, 25
INT6064, 54 UNIT, 26
INT6460, 54 XOR, 25
INT_MULT_UPPER, 25 not included in API
_int_mult_upper, 40 CDABS, 30
INTEGER, 21 CDCOS, 30
Integer data CDEXP, 30
logical operations on, 14 CDLOG, 30
Interlanguage communication, 19, 113 CDSIN, 30
Intrinsic functions CDSQRT, 30
( See Intrinsic procedures ), 23 CLEAR_IEEE_EXCEPTION, 26
Intrinsic procedures CLOC, 28
architecture dependencies, 29 CLOCK, 30
common to Fortran and MIPSpro DATE, 30
not included in API, 29 DCMPLX, 30
complex double, 29 DCONJG, 30
Cray Fortran extensions, 25 DCOT, 30
double, 29 DFLOAT, 30
included in API DIMAG, 30
AND, 24 DISABLE_IEEE_INTERRUPT, 26
COMPL, 24 DREAL, 30
COT, 25 ENABLE_IEEE_INTERRUPT, 26
CSMG, 25 FCD, 28
CVMGM, 25 GET_IEEE_EXCEPTIONS, 26
CVMGN, 25 GET_IEEE_INTERRUPTS, 26
CVMGP, 25 GET_IEEE_ROUNDING_MODE, 27
CVMGT, 25 GET_IEEE_STATUS, 27
CVMGZ, 25 GETPOS, 28
DSHIFTL, 24 IEEE_BINARY_SCALE, 27
DSHIFTR, 24 IEEE_CLASS, 27
EQV, 24 IEEE_COPY_SIGN, 27
INT_MULT_UPPER, 25 IEEE_EXPONENT, 27
IRTC, 25 IEEE_FINITE, 27
LEADZ, 25 IEEE_INT, 27
LENGTH, 25 IEEE_IS_NAN, 27
LOC, 25 IEEE_NEXT_AFTER, 27
MASK, 24 IEEE_REAL, 27
NEQV, 24 IEEE_REMAINDER, 27
NOT, 25
SN–2211 1.0 127
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

IEEE_UNORDERED, 27 J
JDATE, 30
M@CLR, 28 j0, 64
M@LD, 28 j1, 64
M@LDMX, 28 jacct, 90
M@MX, 28 JDATE, 30
M@UL, 28 jn, 64
MEMORY_BARRIER, 29 Job, 89
MY_PE, 28 join, 92
NUMARG, 29 Julian date, 30
RANF, 30
RANGET, 30
RANSET, 31 K
REMOTE_WRITE_BARRIER, 29
RTC, 29 Keywords
SET_IEEE_EXCEPTION, 27 ELEMENTAL, 16
SET_IEEE_EXCEPTIONS, 27 PURE, 16
SET_IEEE_INTERRUPTS, 27 kill, 99
SET_IEEE_ROUNDING_MODE, 28 killm, 89, 103
SET_IEEE_STATUS, 28 killpg, 85
SETPOS, 28 KIND declaration, 12
TEST_IEEE_EXCEPTION, 28 KIND type specifiers, 18
TEST_IEEE_INTERRUPT, 28
WRITE_MEMORY_BARRIER, 29
to support IEEE arithmetic, 26 L
Intrinsic routines
( See Intrinsic procedures ), 23 l64a, 85
IPXFARGC, 60 LANG, 111
IRTC, 25, 29 Language elements
ISELFADD, 57 Fortran, 9
ISELFMUL, 57 Language extensions
ISELFSCH, 57 C
ISERIAL, 59 variable length arrays, 34
ISHELL, 52 C/C++, 33
isign, 64 not included in API, 34
ISO Fortran standard, 9 restricted pointers, 34
ISUP, 57 Fortran, 17
ISUPC, 57 included in API, 33
IVDEP, 19 $, 10
ivdep, 35 @, 10
array reference, 13
assignments, 14
assumed-size array, 14

128 SN–2211 1.0


Index

AUTOMATIC attribute, 11 restricted pointers, 34


binary constants, 11 RESULT variable specifier, 16
BLOCK DATA units, 15 SAVE statement, 13
boolean constants, 11 stop-code type, 16
Boolean masking expressions, 13 tab character, 11
boolean variables, 11 unformatted records, 15
BUFFER IN, 14 %VAL intrinsic, 16
BUFFER OUT, 14 variable length arrays, 34
character constant use, 11 WRITE statement, 15
common blocks with same name, 12 not included in API
compiler directives, 10 $ edit descriptor, 18
complex (C only), 34 * edit descriptor, 18
complex literal constant, 12 comma placement, 17
continuation lines, 10 common block variables, 17
Cray pointers, 12 DECODE, 18
D edit descriptor, 15 DO loop, 17
data declarations, 12 DOUBLE COMPLEX, 18
edit descriptors, 14 ENCODE, 18
ELEMENTAL, 16 hexadecimal floating-point constants (C
END, 10 only), 34
end-of-file, 15 logical and masking operators, 17
equivalencing, 13 LOGICAL constant abbreviations, 17
expressions, 14 NAMELIST, 18
extended range DO, 16 parentheses in expressions, 18
fixed form line length, 11 partial array initialization, 18
format identifier, 15 repeat count, 18
formatted records, 15 Rw edit descriptor, 18
formatting list, 15 TASKCOMMON, 17
Fortran, 10 unit identifier, 17
fortran, 34 Language libraries, 45
hexadecimal constants, 11 LAPACK, 67
Hollerith constants, 12 Layers of FFIO
I/O list, 15 included in API
implied DO variable, 16 bmx, 47
initialization, 13 bufa, 47
list-directed input, 15 cache, 47
multiple common block declarations, 13 cachea, 47
octal constants, 11 cos, 47
parentheses, 15 event, 47
_Pragma, 34 f77, 47
PROGRAM statement, 16 fd, 48
PURE, 16 global, 48
redeclaration of variables, 12 ibm, 48
restricted expressions, 13
SN–2211 1.0 129
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

mr, 48 listmntent, 102


null, 48 lle, 64
site, 48 llt, 64
syscall, 48 loaded, 103
system, 48 loaded_data, 103
tape, 47 LOC, 12, 25
text, 48 localtime_r, 87
user, 48 LOCKASGN, 62
vms, 48 lockf, 85
lchown, 85 LOCKOFF, 62
_LD64, 44 LOCKON, 62
LD_LIBRARY_PATH, 111 LOCKREL, 62
ldexpf, 98 LOCKTEST, 62
ldexpl, 98 lockudb, 89
LEADZ, 25 LOGICAL constant abbreviations, 17
_leadz, 40 logical operator
len, 64 abbreviations not allowed, 17
LENGTH, 25 Logical operators
lge, 64 on reals and integers, 14
lgt, 64 logname, 103
Libraries, 5 Loop dependencies
Fortran, 6 ignored, 19
Mathematical, 6 Loop interchange
Message-passing, 6 inhibited, 21
Scientific, 6 Loop optimization, 20
Library calls Loops
( See System and library calls ), 85 splits, 21
Library functions lsecstat, 97
( See Built-in functions ), 39 lsetattr, 92
libudb, 90 lstat, 85, 108
limit, 90 _ltob, 102
limits, 91 _lwp_kill, 99
Line length _lwp_killm, 99
fixed form
Fortran, 11
Linear recurrence, 68 M
Linear recurrence solvers, 69
LINPACK, 69 M@CLR, 28
lio_listio, 91 M@LD, 28
LIST, 19 M@LDMX, 28
Listings M@MX, 28
toggle on/off, 19 M@UL, 28
listio, 91, 92 Macros, 42
LISTIO_PRECISION, 109
130 SN–2211 1.0
Index

included in API _MAXVL, 44


_ _unix, 43 _mclr, 41
unix, 43 MEMORY_BARRIER, 29
not included in API _memory_barrier, 42
_ADDR32, 44 memstride, 103
_ADDR64, 44 memwchr, 103
CRAY, 43 memwcmp, 103
cray, 43 memwcpy, 103
CRAY1, 43 memword, 103
_CRAY1, 43 memwset, 103
_CRAY, 43 message, 37
_CRAYC, 44 Message Passing Interface library
_CRAYIEEE, 43 ( See MPI library ), 70
_CRAYMPP, 43 Message-passing library, 6
_CRAYT3E, 43 Messages, 101
_FASTMD, 44 min0, 64
_LD64, 44 min1, 64
_MAXVL, 44 MINV, 70
_RELEASE, 44 MIPSpro extensions
_UNICOS, 43 ( See Routines ), 62
malloc, 103 MIPSpro routines
malloc_brk, 103 ( See Routines ), 63
malloc_check, 103 Miscellaneous calls, 101
malloc_error, 103 mknod, 85
malloc_expand, 103 mktemp, 85
malloc_extend, 103 _mld, 41
malloc_howbig, 103 mldlist, 96
malloc_inplace, 103 _mldmx, 41
malloc_isvalid, 103 mldname, 96
malloc_limit, 103 mldwalk, 96
malloc_space, 103 mls_create, 96
malloc_stats, 103 mls_dominate, 96
MASK, 24 mls_equal, 96
_mask, 40 mls_export, 96
_maskl, 40 mls_extract, 96
_maskr, 40 mls_free, 96
Math functions mls_glb, 96
( See also System and library calls ), 97 mls_import, 96
Math routines mls_lub, 96
( See also Routines ), 58, 63, 65 _mmx, 41
Mathematical library, 6 mod, 64
max0, 64 modfl, 98
max1, 64 MODINLINE, 21
MAXCPUS, 23
SN–2211 1.0 131
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

MOVBIT, 52 nint, 64
MOVBITZ, 52 NLIMIT, 58
MP_DEDICATED, 110 nlimit, 90
MP_HOLDTIME, 110 NLOCKOFF, 62
MP_SAMPLE, 110 NLOCKON, 63
MP_SLVSIN, 110 NLOCKTEST, 63
MP_SLVSSZ, 110 NLSPATH, 110, 112
MPI library, 70 NO INTERCHANGE, 21
mr, 48 NO SIDE EFFECTS, 21
MSG_FORMAT, 110, 111 NOBL, 20
MSIO, 58 NOBOUNDS, 20
mtimes, 99 nobounds, 36
_mul, 41 NOFLOW, 20
Multilevel security NOINLINE, 21
( See System and library calls ), 95 noinline, 35
Multithreaded process support, 98 NOLIST, 19
MVC, 61 NOMODINLINE, 21
MXM, 70 noopt, 37
MXMA, 70 NOPATTERN, 21
MXV, 70 NORECURRENCE, 21
MXVA, 70 noreduction, 37
MY_PE, 28, 71 NOSPLIT, 21
_my_pe, 40, 72 NOT, 25
NOT, bitwise
on reals and integers, 14
N NOUNROLL, 22
NOVECTOR, 22
N$PES, 28 novector, 37
nam2acid, 89 NOVSEARCH, 22
nam2gid, 89 novsearch, 37
nam2uid, 89 NPROC, 111, 112
NAME, 19 nschedv, 91
NAMELIST, 18 nsecctl, 100
character manipulation routines, 60 null, 48
NC1FS file system, 91 NUM_PES, 72
NEQV, 24 _num_pes, 40, 72
Networking routines NUMARG, 29, 61
( See System and library calls ), 100 _numargs, 41
newexit, 99 Number of PE, 28
newgetpid, 99 Number of PEs in job, 28
newgetppid, 99 NUMBLKS, 52
NEXTSCALAR, 21 NUMCPUS, 23
nftw, 85 NVE2CRAY, 54
nicem, 89, 103
132 SN–2211 1.0
Index

O Pipelining
defining threshold, 20
Octal constants, 11 Point-to-point synchronization routines
open, 106, 105 ( See also Routines ), 83
OPENDR, 57 ( See Routines ), 76
openi, 92 Pointer arithmetic
openlog, 85 differences, 12
OPENMS, 58 policy, 91
Operators POPCNT, 25
logical, 17 _popcnt, 40
masking, 17 POPCNT_V, 65
opt, 37 POPPAR, 25
OR, 25 _poppar, 40
OR, bitwise POSIX 1003.1-1996 standard, 87
on reals and integers, 14 pow, 98
#pragma directives, 34
included in API, 35
P can_instantiate, 35
do_not_instantiate, 35
P32, 54 ident, 35
P6460, 54 inline, 35
PACK, 61 instantiate, 35
Packages ivdep, 35
( See Routines ), 68 noinline, 35
PARALLEL, 23 unroll, 36
parallel, 39 not included in API, 36
Parallel applications align, 36
( See Environment variables ), 110 bounds, 36
Parallel Virtual Machine library cache_align, 36
( See PVM library ), 70 cache_bypass, 36
Parentheses case, 39
format descriptor, 15 common, 36
in expressions, 18 duplicate, 37
parsetos, 100 endcase, 39
pathname, 103 endguard, 39
PATTERN, 21 endloop, 39
Pattern matching endparallel, 39
toggles on/off, 21 guard, 39
PAUSE statement, 16 message, 37
_pbit, 40 nobounds, 36
_pbits, 40 noopt, 37
PE query routines noreduction, 37
( See Routines ), 71 novector, 37
PERMUTATION, 20, 23
SN–2211 1.0 133
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

novsearch, 37 ( See also Routines ), 59


opt, 37 PROGRAM statement, 16
parallel, 39 program unit extensions, Fortran, 15
prefertask, 37 pthread_atfork, 87
prefervector, 37 pthread_attr_destroy, 87
shortloop, 38 pthread_attr_getdetachstate, 87
shortloop128, 38 pthread_attr_getstackaddr, 87
soft, 38 pthread_attr_getstacksize, 87
split, 38 pthread_attr_init, 87
suppress, 38 pthread_attr_setdetachstate, 87
symmetric, 38 pthread_attr_setstackaddr, 87
taskcommon, 36 pthread_attr_setstacksize, 87
taskloop, 39 pthread_cond_broadcast, 87
taskprivate, 38 pthread_cond_destroy, 87
taskshared, 38 pthread_cond_init, 87
uses_eregs, 39 pthread_cond_signal, 87
vfunction, 39 pthread_cond_timedwait, 87
_Pragma, 34 pthread_cond_wait, 87
Predefined macros pthread_condattr_destroy, 87
( See Macros ), 42 pthread_condattr_init, 87
PREFERTASK, 21 pthread_create, 87
prefertask, 37 pthread_detach, 87
PREFERVECTOR, 21 pthread_exit, 87
prefervector, 37 pthread_getspecific, 87
PRINT statement, 15 pthread_join, 87
priv_clear_file, 96 pthread_key_create, 87
priv_clear_proc, 96 pthread_key_delete, 87
priv_dup_file, 96 pthread_mutex_destroy, 87
priv_free_file, 96 pthread_mutex_init, 87
priv_free_proc, 96 pthread_mutex_lock, 87
priv_get_fd, 96 pthread_mutex_trylock, 87
priv_get_file, 96 pthread_mutex_unlock, 87
priv_get_file_flag, 96 pthread_mutexattr_destroy, 87
priv_get_proc, 96 pthread_mutexattr_init, 87
priv_get_proc_flag, 96 pthread_once, 87
priv_init_file, 96 pthread_self, 87
priv_init_proc, 96 pthread_setspecific, 87
priv_set_fd, 96 pthread_sigmask, 87
priv_set_file, 96 Pthreads functions
priv_set_file_flag, 96 ( See System and library calls ), 98
priv_set_proc, 96 ptrace, 108
priv_set_proc_flag, 96 ptyrecon, 104
profil, 108 PURE, 16
Program analysis routines
134 SN–2211 1.0
Index

put routines, 82 real, 64


( See also Routines ), 72 Real data
strided logical operations on, 14
( See also Routines ), 74 realpath, 85
PUTBYT, 61 recall, 92
putc_unlocked, 87 recalla, 92
putchar_unlocked, 87 recalls, 91, 92
PUTWA, 58 Records
PVM library, 70 formatted, 15
PXF configuration information, 26 unformatted, 15
PXF_DEFINITIONS, 26 RECURRENCE, 21
PXFGETARG, 60 Recursive function calls, 16
PXFGETCWD, 60 Redeclaration of variables, 12
Reduction loops
toggles vectorization, 21
Q _RELEASE, 44
REMARK, 61
quotactl, 108 REMARK2, 61
REMARKF, 61
REMOTE_WRITE_BARRIER, 29
R _remote_write_barrier, 42
remque, 85
rand_r, 87 Repeat count, 18
random, 85 repeat count, 18
RANDOM_NUMBER, 30 resch, 99
RANDOM_SEED, 30, 31 Resource limits
RANF, 30 ( See System and library calls ), 89
_ranf, 41 Resource management routines
RANF_V, 65 ( See Routines ), 58
RANGET, 30 restart, 93
RANSET, 31 Restart feature, 93
RBN, 54 Restricted expressions
rcmdexec, 100 Fortran, 13
READ, 58 Restricted pointers, 34
reada, 91, 92 RESULT variable specifier, 16
READC, 58 resume, 105
READCP, 58 rewriteudb, 89
readdir_r, 87 rindex, 85
READDR, 57 rmfacl, 96
READMS, 58 RNB, 54
READP, 58 RNL routines, 60
_readSB, 42 Routines
_readSR, 42 data conversion, 49
_readST, 42
SN–2211 1.0 135
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

included in API, 79 dlog10, 63


ABORT, 52 dmax1, 64
abs, 63 dmin1, 64
acos, 63 dmod, 64
aimag, 63 dsign, 64
aint, 63 dsin, 64
alog, 63 dsinh, 64
alog10, 63 dsqrt, 64
amax0, 64 dtan, 65
amax1, 64 dtanh, 65
amin0, 64 erf, 64
amin1, 64 erfc, 64
amod, 64 EXIT, 52
asin, 63 exp, 64
atan, 63 FAST_SHMEM_INT4_INC, 77
atan2, 64 fast_shmem_short_finc, 78
cabs, 63 fast_shmem_short_inc, 78
ccos, 64 float, 64
cexp, 64 iabs, 63
char, 64 IBM2CRI, 52
clog, 63 ichar, 64
cmplx, 64 idim, 64
conjg, 64 idint, 64
cos, 64 idnint, 64
cosh, 64 IEG2CRI, 52
Cray Fortran applications library, 46 IEU2CRI, 52
CRI2IBM, 52 ifix, 64
CRI2IEG, 52 index, 64
CRI2IEU, 52 int, 64
csin, 64 ISHELL, 52
csqrt, 64 isign, 64
dabs, 63 j0, 64
dacos, 63 j1, 64
dasin, 63 jn, 64
datan, 63 len, 64
datan2, 64 lge, 64
dble, 64 lgt, 64
dcos, 64 lle, 64
dcosh, 64 llt, 64
ddim, 64 max0, 64
dexp, 64 max1, 64
dim, 64 min0, 64
dint, 63 min1, 64
dlog, 63
136 SN–2211 1.0
Index

mod, 64 shmem_double_iput, 75
MOVBIT, 52 shmem_double_max_to_all, 80
MOVBITZ, 52 shmem_double_min_to_all, 80
MY_PE, 71 shmem_double_p, 73
_my_pe, 72 shmem_double_prod_to_all, 80
nint, 64 shmem_double_put, 73
NUM_PES, 72 shmem_double_sum_to_all, 80
_num_pes, 72 shmem_double_swap, 78
NUMBLKS, 52 shmem_fcollect32, 82
PXF routines, 50 SHMEM_FCOLLECT4, 81
real, 64 shmem_fcollect64, 82
SECOND, 52 SHMEM_FCOLLECT8, 81
SECONDR, 52 shmem_fence, 76
sgnl, 64 shmem_float_g, 74
shmem_barrier_all, 77 shmem_float_get, 74
shmem_broadcast32, 81 shmem_float_iget, 76
SHMEM_BROADCAST4, 81 shmem_float_iput, 75
shmem_broadcast64, 81 shmem_float_max_to_all, 80
SHMEM_BROADCAST8, 81 shmem_float_min_to_all, 80
SHMEM_CLEAR_CACHE_INV, 81 shmem_float_p, 73
shmem_clear_cache_inv, 81 shmem_float_prod_to_all, 80
SHMEM_CLEAR_LOCK, 78 shmem_float_put, 73
shmem_clear_lock, 78 shmem_float_sum_to_all, 80
shmem_collect32, 82 shmem_float_swap, 78
SHMEM_COLLECT4, 81 shmem_get128, 73
shmem_collect64, 82 shmem_get32, 73
SHMEM_COLLECT8, 81 SHMEM_GET4, 74
SHMEM_COMP4_PROD_TO_ALL, 79 shmem_get64, 73
SHMEM_COMP4_SUM_TO_ALL, 79 SHMEM_GET8, 74
SHMEM_COMP4_XOR_TO_ALL, 79 shmem_getmem, 73
SHMEM_COMP8_PROD_TO_ALL, 79 shmem_iget128, 75
SHMEM_COMP8_SUM_TO_ALL, 79 shmem_iget32, 75
SHMEM_COMP8_XOR_TO_ALL, 79 SHMEM_IGET4, 76
SHMEM_COMPLEX_GET, 74 shmem_iget64, 75
SHMEM_COMPLEX_IGET, 76 SHMEM_INT4_ADD, 79
SHMEM_COMPLEX_IPUT, 75 SHMEM_INT4_AND_TO_ALL, 78
SHMEM_COMPLEX_PUT, 73 SHMEM_INT4_CSWAP, 77
shmem_complexd_prod_to_all, 80 SHMEM_INT4_FADD, 77
shmem_complexd_sum_to_all, 80 SHMEM_INT4_FINC, 77
shmem_complexf_prod_to_all, 80 SHMEM_INT4_INC, 77
shmem_complexf_sum_to_all, 80 SHMEM_INT4_MAX_TO_ALL, 78
shmem_double_g, 74 SHMEM_INT4_MIN_TO_ALL, 79
shmem_double_get, 74 SHMEM_INT4_MSWAP, 77
shmem_double_iget, 76
SN–2211 1.0 137
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SHMEM_INT4_OR_TO_ALL, 79 shmem_long_cswap, 78
SHMEM_INT4_PROD_TO_ALL, 79 shmem_long_g, 74
SHMEM_INT4_SUM_TO_ALL, 79 shmem_long_get, 74
SHMEM_INT4_SWAP, 77 shmem_long_iget, 76
SHMEM_INT4_XOR_TO_ALL, 79 shmem_long_iput, 75
SHMEM_INT8_AND_TO_ALL, 78 shmem_long_mswap, 78
SHMEM_INT8_CSWAP, 77 shmem_long_p, 73
SHMEM_INT8_MAX_TO_ALL, 78 shmem_long_put, 73
SHMEM_INT8_MIN_TO_ALL, 79 shmem_long_swap, 78
SHMEM_INT8_MSWAP, 77 shmem_longdouble_get, 74
SHMEM_INT8_OR_TO_ALL, 79 shmem_longdouble_iget, 75
SHMEM_INT8_PROD_TO_ALL, 79 shmem_longdouble_iput, 75
SHMEM_INT8_SUM_TO_ALL, 79 shmem_longdouble_max_to_all, 80
SHMEM_INT8_SWAP, 77 shmem_longdouble_min_to_all, 80
SHMEM_INT8_XOR_TO_ALL, 79 shmem_longdouble_prod_to_all, 80
shmem_int_and_to_all, 79 shmem_longdouble_put, 73
shmem_int_cswap, 78 shmem_longdouble_sum_to_all, 80
shmem_int_g, 74 shmem_longlong_get, 74
shmem_int_get, 74 shmem_longlong_iget, 75
shmem_int_iget, 76 SHMEM_MY_PE, 72
shmem_int_iput, 75 shmem_my_pe, 72
shmem_int_max_to_all, 80 SHMEM_N_PES, 72
shmem_int_min_to_all, 80 shmem_n_pes, 72
shmem_int_mswap, 78 shmem_put128, 72
shmem_int_or_to_all, 80 shmem_put32, 72
shmem_int_p, 73 SHMEM_PUT4, 73
shmem_int_prod_to_all, 80 shmem_put64, 72
SHMEM_INT_PUT, 73 SHMEM_PUT8, 73
shmem_int_put, 73 shmem_putmem, 72
shmem_int_sum_to_all, 80 shmem_quiet, 76
shmem_int_swap, 78 SHMEM_REAL16_MIN_TO_ALL, 79
shmem_int_xor_to_all, 80 SHMEM_REAL16_PROD_TO_ALL, 79
SHMEM_INTEGER_GET, 74 SHMEM_REAL16_SUM_TO_ALL, 79
SHMEM_INTEGER_IGET, 76 SHMEM_REAL4_MAX_TO_ALL, 78
SHMEM_INTEGER_IPUT, 75 SHMEM_REAL4_MIN_TO_ALL, 79
shmem_iput128, 74 SHMEM_REAL4_PROD_TO_ALL, 79
shmem_iput32, 74 SHMEM_REAL4_SUM_TO_ALL, 79
SHMEM_IPUT4, 75 SHMEM_REAL4_SWAP, 77
shmem_iput64, 74 SHMEM_REAL4_XOR_TO_ALL, 79
SHMEM_IPUT8, 75 SHMEM_REAL8_MAX_TO_ALL, 78
SHMEM_LOGICAL_GET, 74 SHMEM_REAL8_MIN_TO_ALL, 79
SHMEM_LOGICAL_IGET, 76 SHMEM_REAL8_PROD_TO_ALL, 79
SHMEM_LOGICAL_IPUT, 75 SHMEM_REAL8_SUM_TO_ALL, 79
SHMEM_LOGICAL_PUT, 73
138 SN–2211 1.0
Index

SHMEM_REAL8_SWAP, 77 tan, 65
SHMEM_REAL8_XOR_TO_ALL, 79 tanh, 65
SHMEM_REAL_GET, 74 TIMEF, 52
SHMEM_REAL_IGET, 76 USCCTC, 53
SHMEM_REAL_IPUT, 75 USCCTI, 53
SHMEM_REAL_PUT, 73 y0, 65
SHMEM_SET_CACHE_INV, 81 y1, 65
shmem_set_cache_inv, 81 yn, 65
SHMEM_SET_CACHE_LINE_INV, 81 not included in API
shmem_set_cache_line_inv, 81 ALOG_V, 65
SHMEM_SET_LOCK, 78 APUTWA, 58
shmem_set_lock, 78 AQCLOSE, 57
shmem_short_add, 79 AQIO, 57
shmem_short_and_to_all, 79 AQOPEN, 57
shmem_short_cswap, 78 AQREAD, 57
shmem_short_fadd, 79 AQREADC, 57
shmem_short_finc, 78 AQSTAT, 57
shmem_short_g, 74 AQWRITE, 57
shmem_short_get, 74 ASCDC, 54
shmem_short_iget, 76 ASYNCDR, 57
shmem_short_inc, 78 ASYNCMS, 58
shmem_short_max_to_all, 80 B2OCT, 54
shmem_short_min_to_all, 80 BARASGN, 56
shmem_short_mswap, 78 BARREL, 56
shmem_short_or_to_all, 80 BARSYNC, 56
shmem_short_p, 73 BITVEC, 60
shmem_short_prod_to_all, 80 BITVECM, 60
shmem_short_put, 73 BUFDUMP, 56
shmem_short_sum_to_all, 80 BUFPRINT, 56
shmem_short_swap, 78 BUFTUNE, 56
shmem_short_xor_to_all, 80 BUFUSER, 56
shmem_swap, 77 CDC2CRAY, 54
SHMEM_TEST_LOCK, 78 CHCONV, 54
shmem_test_lock, 78 CHECKDR, 57
shmem_udcflush, 81 CHECKMS, 58
shmem_udcflush_line, 81 CLEARBT, 60
shmem_wait, 76 CLEARFI, 60
shmem_wait_until, 76 CLOSDR, 57
sign, 64 CLOSMS, 58
sin, 64 COS_V, 65
sinh, 64 COSS_V, 65
sqrt, 64 Cray convolution, 68
start_pes, 76 Cray direct sparse, 68
STRMOV, 52
SN–2211 1.0 139
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

Cray distributed FFT, 68 GETOARGC, 60


Cray FFT, 69 GETPMC, 61
Cray linear recurrence, 69 GETVARG, 60
Cray sorting and searching, 69 GETVARGC, 60
CRAY2CDC, 54 GETWA, 58
CRAY2CRI, 55 GTSTDPTR, 61
CRAY2ETA, 54 HCOS_V, 65
CRAY2IBD, 54 HCOSS_V, 65
CRAY2IBM, 54 HEXP_V, 65
CRAY2IEG, 55 HLOG_V, 65
CRAY2NVE, 54 HPALLOC, 58
CRAY2VAX, 56 HPCHECK, 58
CRAYDUMP, 59 HPCLMOVE, 58
CRI2CRAY, 55 HPDEALLC, 58
CRI2CRY, 56 HPDUMP, 58
CRI2IEG_77, 55 HPNEWLEN, 58
CRY2CRI, 56 HPSHRINK, 58
DRIO, 57 HSIN_V, 65
DSASC, 54 HSQRT_V, 65
EISPACK, 69 HSQRTINV_V, 65
ERREXIT, 60 HTOR_VV, 65
ETA2CRAY, 54 IARGC, 60
EVASGN, 62 IBD2CRAY, 54
EVCLEAR, 62 IBM2CRAY, 54
EVPOST, 62 ICEIL, 58
EVREL, 62 ICPUSED, 57
EVTEST, 62 ICRITADD, 57
EVWAIT, 62 ICRITMUL, 57
EXP_V, 65 IEG2CRAY, 55
FINDMS, 58 IEG2CRI_77, 55
FLOWMARK, 59 IGTBYT, 61
FP6064, 54 IHPLEN, 58
FP6460, 54 IHPSTAT, 58
FSIGCTL, 59 IHPVALID, 58
FSUP, 57 INT6064, 54
FSUPC, 57 INT6460, 54
GAMMA, 58 IPXFARGC, 60
GATHER, 70 ISELFADD, 57
GETARG, 60 ISELFMUL, 57
GETCALLERINFO, 59 ISELFSCH, 57
GETCPUS, 60 ISERIAL, 59
GETCWD, 60 ISUP, 57
GETHOST, 61 ISUPC, 57
GETNAMEQ, 59
140 SN–2211 1.0
Index

LINPACK, 69 SAXPY, 70
LOCKASGN, 62 SCATTER, 70
LOCKOFF, 62 SDOT, 70
LOCKON, 62 SDSALLOC, 59
LOCKREL, 62 SDSFREE, 59
LOCKTEST, 62 SDSINFO, 59
MINV, 70 SDSREALC, 59
MSIO, 58 SEEK, 58
MVC, 61 SENSEBT, 60
MXM, 70 SENSEFI, 60
MXMA, 70 SETBT, 60
MXV, 70 SETFI, 60
MXVA, 70 SETPLIMQ, 61
NLIMIT, 58 SHMEM_BROADCAST, 82
NLOCKOFF, 62 shmem_broadcast, 82
NLOCKON, 63 SHMEM_CLEAR_EVENT, 83
NLOCKTEST, 63 shmem_clear_event, 83
NUMARG, 61 SHMEM_COLLECT, 83
NVE2CRAY, 54 shmem_collect, 83
OPENDR, 57 SHMEM_FCOLLECT, 83
OPENMS, 58 shmem_fcollect, 83
P32, 54 SHMEM_GET, 82
P6460, 54 shmem_get, 82
PACK, 61 SHMEM_PUT, 82
POPCNT_V, 65 shmem_put, 82
PUTBYT, 61 SHMEM_SET_EVENT, 83
PUTWA, 58 shmem_set_event, 83
PXFGETARG, 60 SHMEM_STACK, 83
PXFGETCWD, 60 shmem_stack, 83
RANF_V, 65 SHMEM_TEST_EVENT, 83
RBN, 54 shmem_test_event, 83
READ, 58 SHMEM_WAIT_EVENT, 83
READC, 58 shmem_wait_event, 83
READCP, 58 SHPALLOC, 59
READDR, 57 SHPCLMOVE, 59
READMS, 58 SHPDEALLC, 59
READP, 58 SHUTDSAV, 61
REMARK, 61 SIGOFF, 61
REMARK2, 61 SIGON, 61
REMARKF, 61 SIN_V, 65
RNB, 54 SITRSOL, 70
RNL routines, 60 Sparse BLAS 1, 70
RTOR_VV, 65 SQRT_V, 65
SAMEFILE, 61
SN–2211 1.0 141
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

SQRTINV_V, 65 USSCTC, 55
STACKSZ, 59 USSCTI, 55
STINDR, 57 VAX2CRAY, 56
STINDX, 58 VBLAS, 70
STKSTAT, 59 VLAPACK, 70
Superseded routines, 70 VXBCTC, 56
SXMPY, 70 VXBCTI, 56
SYMDEBUG, 59 VXDCTC, 56
SYMDUMP, 59 VXDCTI, 56
SYNCDR, 57 VXGCTC, 56
SYNCMS, 58 VXGCTI, 56
TMADW, 62 VXICTC, 56
TMAMU, 62 VXICTI, 56
TMATS, 62 VXLCTC, 56
TMINIT, 62 VXLCTI, 56
TMMSC, 62 VXSCTC, 56
TMMVE, 62 VXSCTI, 56
TMPTC, 62 VXZCTC, 56, 57
TMPTS, 62 VXZCTI, 56
TMSRC, 62 WAIO, 58
TMVSC, 62 WAITDR, 57
TRACEBK, 59 WAITMS, 58
TRBK, 59 WCLOSE, 58
TRBKLVL, 59 WNL routines, 60
TREMAIN, 59 WOPEN, 58
TSECND, 59, 63 WRITDR, 57
TSKLIST, 57 WRITE, 58
TSKSTART, 63 WRITEC, 58
TSKTEST, 57 WRITECP, 58
TSKTUNE, 57 WRITEP, 58
TSKVALUE, 63 WRITMS, 58
TSKWAIT, 63 XCRITADD, 57
U32, 54 XCRITMUL, 57
U6064, 54 XPFMT, 60
UNAME, 62 XSELFADD, 57
UNPACK, 62 XSELFMUL, 57
USDCTC, 55 rpc, 100
USDCTI, 55 RTC, 29
USICTC, 55 _rtc, 41
USICTI, 55 rtclock, 104
USICTP, 55 RTOR_VV, 65
USLCTC, 55
USLCTI, 55
USPCTC, 55
142 SN–2211 1.0
Index

S secnames, 97
secnums, 97
SAMEFILE, 61 SECOND, 52
SAVE statement, 13 SECONDR, 52
SAXPY, 70 secstat, 97
sbreak, 104 Security, 95
sbrk, 85 secwords, 97
ScaLAPACK, 67 SEEK, 58
Scalar argument select, 85
passed by value, 16 _semclr, 42
Scalar optimization _semget, 42
suppressed, 22 _semput, 42
SCATTER, 70 _semset, 42
Scheduling _semts, 42
( See System and library calls ), 89 SENSEBT, 60
schedv, 91 SENSEFI, 60
Scientific libraries SET_IEEE_EXCEPTION, 27
Silicon Graphics/Cray scientific library SET_IEEE_EXCEPTIONS, 27
( See SCSL ), 66 SET_IEEE_INTERRUPTS, 27
Scientific library, 6 SET_IEEE_ROUNDING_MODE, 28
SCSL, 66 SET_IEEE_STATUS, 28
future releases SETBT, 60
Convolution, 68 setdevs, 97
direct sparse, 68 setenv, 104
Distributed FFT, 67 setfacl, 96
linear recurrence, 68 setfcmp, 97
ScaLAPACK, 67 setfflg, 97
Sorting and searching, 68 SETFI, 60
SCSL components setflvl, 97
included in API setfsent, 102
FFT, 67 setgrent, 85
LAPACK, 67 setjob, 90
Nonstandard BLAS, 67 setlim, 90
Standard BLAS, 66 setloghost, 104
SDOT, 70 setlogmask, 85
SDSALLOC, 59 setlogname, 104
sdsalloc, 94 setlogport, 104
SDSFREE, 59 setpal, 96
sdsfree, 94 setpermit, 90
SDSINFO, 59 setpgrp, 85
sdsinfo, 94 SETPLIMQ, 61
SDSREALC, 59 setportbm, 101
sdsrealloc, 94 SETPOS, 28
secbits, 97
SN–2211 1.0 143
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

setppriv, 96 SHMEM_COLLECT, 83
setpwent, 85 shmem_collect, 83
setregid, 85 shmem_collect32, 82
setreuid, 85 SHMEM_COLLECT4, 81
setsysv, 96 shmem_collect64, 82
settosent, 100 SHMEM_COLLECT8, 81
setucat, 97 SHMEM_COMP4_PROD_TO_ALL, 79
setucmp, 97 SHMEM_COMP4_SUM_TO_ALL, 79
setudb, 89 SHMEM_COMP4_XOR_TO_ALL, 79
setudbdefault, 89 SHMEM_COMP8_PROD_TO_ALL, 79
setudbpath, 89 SHMEM_COMP8_SUM_TO_ALL, 79
setudbtmap, 89 SHMEM_COMP8_XOR_TO_ALL, 79
setulvl, 97 SHMEM_COMPLEX_GET, 74
setusershell, 103 SHMEM_COMPLEX_IGET, 76
setusrv, 96 SHMEM_COMPLEX_IPUT, 75
_setvm, 41 SHMEM_COMPLEX_PUT, 73
sgnl, 64 shmem_complexd_prod_to_all, 80
sh, 112 shmem_complexd_sum_to_all, 80
Shared memory library shmem_complexf_prod_to_all, 80
( See Routines ), 71 shmem_complexf_sum_to_all, 80
shfree, 104 shmem_double_g, 74
shfree_nb, 104 shmem_double_get, 74
SHIFTA, 25 shmem_double_iget, 76
SHIFTL, 25 shmem_double_iput, 75
SHIFTR, 25 shmem_double_max_to_all, 80
shmalloc, 104 shmem_double_min_to_all, 80
shmalloc_check, 104 shmem_double_p, 73
shmalloc_nb, 104 shmem_double_prod_to_all, 80
shmalloc_stats, 104 shmem_double_put, 73
SHMEM routines shmem_double_sum_to_all, 80
( See Routines ), 71 shmem_double_swap, 78
shmem_barrier_all, 77 SHMEM_FCOLLECT, 83
SHMEM_BROADCAST, 82 shmem_fcollect, 83
shmem_broadcast, 82 shmem_fcollect32, 82
shmem_broadcast32, 81 SHMEM_FCOLLECT4, 81
SHMEM_BROADCAST4, 81 shmem_fcollect64, 82
shmem_broadcast64, 81 SHMEM_FCOLLECT8, 81
SHMEM_BROADCAST8, 81 shmem_fence, 76
SHMEM_CLEAR_CACHE_INV, 81 shmem_float_g, 74
shmem_clear_cache_inv, 81 shmem_float_get, 74
SHMEM_CLEAR_EVENT, 83 shmem_float_iget, 76
shmem_clear_event, 83 shmem_float_iput, 75
SHMEM_CLEAR_LOCK, 78 shmem_float_max_to_all, 80
shmem_clear_lock, 78
144 SN–2211 1.0
Index

shmem_float_min_to_all, 80 shmem_int_g, 74
shmem_float_p, 73 shmem_int_get, 74
shmem_float_prod_to_all, 80 shmem_int_iget, 76
shmem_float_put, 73 shmem_int_iput, 75
shmem_float_sum_to_all, 80 shmem_int_max_to_all, 80
shmem_float_swap, 78 shmem_int_min_to_all, 80
SHMEM_GET, 82 shmem_int_mswap, 78
shmem_get, 82 shmem_int_or_to_all, 80
shmem_get128, 73 shmem_int_p, 73
shmem_get32, 73 shmem_int_prod_to_all, 80
SHMEM_GET4, 74 SHMEM_INT_PUT, 73
shmem_get64, 73 shmem_int_put, 73
SHMEM_GET8, 74 shmem_int_sum_to_all, 80
shmem_getmem, 73 shmem_int_swap, 78
shmem_iget128, 75 shmem_int_xor_to_all, 80
shmem_iget32, 75 SHMEM_INTEGER_GET, 74
shmem_iget64, 75 SHMEM_INTEGER_IGET, 76
SHMEM_IGET8, 76 SHMEM_INTEGER_IPUT, 75
SHMEM_INT4_ADD, 79 shmem_iput128, 74
SHMEM_INT4_AND_TO_ALL, 78 shmem_iput32, 74
SHMEM_INT4_CSWAP, 77 SHMEM_IPUT4, 75
SHMEM_INT4_FADD, 77 shmem_iput64, 74
SHMEM_INT4_FINC, 77 SHMEM_IPUT8, 75
SHMEM_INT4_INC, 77 SHMEM_LOGICAL_GET, 74
SHMEM_INT4_MAX_TO_ALL, 78 SHMEM_LOGICAL_IGET, 76
SHMEM_INT4_MIN_TO_ALL, 79 SHMEM_LOGICAL_IPUT, 75
SHMEM_INT4_MSWAP, 77 SHMEM_LOGICAL_PUT, 73
SHMEM_INT4_OR_TO_ALL, 79 shmem_long_cswap, 78
SHMEM_INT4_PROD_TO_ALL, 79 shmem_long_g, 74
SHMEM_INT4_SUM_TO_ALL, 79 shmem_long_get, 74
SHMEM_INT4_SWAP, 77 shmem_long_iget, 76
SHMEM_INT4_XOR_TO_ALL, 79 shmem_long_iput, 75
SHMEM_INT8_AND_TO_ALL, 78 shmem_long_mswap, 78
SHMEM_INT8_CSWAP, 77 shmem_long_p, 73
SHMEM_INT8_MAX_TO_ALL, 78 shmem_long_put, 73
SHMEM_INT8_MIN_TO_ALL, 79 shmem_long_swap, 78
SHMEM_INT8_MSWAP, 77 shmem_longdouble_get, 74
SHMEM_INT8_OR_TO_ALL, 79 shmem_longdouble_iget, 75
SHMEM_INT8_PROD_TO_ALL, 79 shmem_longdouble_iput, 75
SHMEM_INT8_SUM_TO_ALL, 79 shmem_longdouble_max_to_all, 80
SHMEM_INT8_SWAP, 77 shmem_longdouble_min_to_all, 80
SHMEM_INT8_XOR_TO_ALL, 79 shmem_longdouble_prod_to_all, 80
shmem_int_and_to_all, 79 shmem_longdouble_put, 73
shmem_int_cswap, 78
SN–2211 1.0 145
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

shmem_longdouble_sum_to_all, 80 shmem_short_and_to_all, 79
shmem_longlong_get, 74 shmem_short_cswap, 78
shmem_longlong_iget, 75 shmem_short_fadd, 79
SHMEM_MY_PE, 72 shmem_short_finc, 78
shmem_my_pe, 72 shmem_short_g, 74
SHMEM_N_PES, 72 shmem_short_get, 74
shmem_n_pes, 72 shmem_short_iget, 76
SHMEM_PUT, 82 shmem_short_inc, 78
shmem_put, 82 shmem_short_max_to_all, 80
shmem_put128, 72 shmem_short_min_to_all, 80
shmem_put32, 72 shmem_short_mswap, 78
SHMEM_PUT4, 73 shmem_short_or_to_all, 80
shmem_put64, 72 shmem_short_p, 73
SHMEM_PUT8, 73 shmem_short_prod_to_all, 80
shmem_putmem, 72 shmem_short_put, 73
shmem_quiet, 76 shmem_short_sum_to_all, 80
SHMEM_REAL16_MIN_TO_ALL, 79 shmem_short_swap, 78
SHMEM_REAL16_PROD_TO_ALL, 79 shmem_short_xor_to_all, 80
SHMEM_REAL16_SUM_TO_ALL, 79 SHMEM_STACK, 83
SHMEM_REAL4_MAX_TO_ALL, 78 shmem_stack, 83
SHMEM_REAL4_MIN_TO_ALL, 79 shmem_swap, 77
SHMEM_REAL4_PROD_TO_ALL, 79 SHMEM_TEST_EVENT, 83
SHMEM_REAL4_SUM_TO_ALL, 79 shmem_test_event, 83
SHMEM_REAL4_SWAP, 77 SHMEM_TEST_LOCK, 78
SHMEM_REAL4_XOR_TO_ALL, 79 shmem_test_lock, 78
SHMEM_REAL8_MAX_TO_ALL, 78 shmem_udcflush, 81
SHMEM_REAL8_MIN_TO_ALL, 79 shmem_udcflush_line, 81
SHMEM_REAL8_PROD_TO_ALL, 79 shmem_wait, 76
SHMEM_REAL8_SUM_TO_ALL, 79 SHMEM_WAIT_EVENT, 83
SHMEM_REAL8_SWAP, 77 shmem_wait_event, 83
SHMEM_REAL8_XOR_TO_ALL, 79 shmem_wait_until, 76
SHMEM_REAL_GET, 74 SHORTLOOP, 21
SHMEM_REAL_IGET, 76 shortloop, 38
SHMEM_REAL_IPUT, 75 SHORTLOOP128, 21
SHMEM_REAL_PUT, 73 shortloop128, 38
SHMEM_SET_CACHE_INV, 81 SHPALLOC, 59
shmem_set_cache_inv, 81 SHPCLMOVE, 59
SHMEM_SET_CACHE_LINE_INV, 81 SHPDEALLC, 59
shmem_set_cache_line_inv, 81 shrealloc, 104
SHMEM_SET_EVENT, 83 shrealloc_nb, 104
shmem_set_event, 83 SHUTDSAV, 61
SHMEM_SET_LOCK, 78 shutdsav, 93
shmem_set_lock, 78 sigctl, 104
shmem_short_add, 79
146 SN–2211 1.0
Index

sighold, 85 Standards
sigignore, 85 Fortran 90, 9
sign, 64 ISO, Fortran, 9
Sign-extended shift, 25 X/Open Single Unix Specification, 85
SIGOFF, 61 X/Open XPG4 , 85
sigoff, 104 start_pes, 76
SIGON, 61 stat, 108, 105
sigon, 104 statvfs, 85
sigpause, 85 STINDR, 57
sigrelse, 85 STINDX, 58
sigset, 85 STKSTAT, 59
sigwait, 87 STOP statement, 16
Silicon Graphics Fortran Stop-code type, 16
definition, 9 Storage
sin, 64, 98 of string in object file, 19
SIN_V, 65 Storage association
sinh, 64 Fortran, 12
site, 48 strdup, 85
SITRSOL, 70 string, 104
Slash (/) edit descriptor, 18 STRMOV, 52
slgentry, 97 strncasecmp, 85
slgtrust, 97 strnrstrn, 104
slgtrustobj, 97 strnstrn, 104
SNGLR, 66 strrstr, 104
snprintf, 104 strtod, 104
socket, 108 strtof, 104
soft, 38 strtok_r, 87
Solid-state storage devices (SSD), 94 strtold, 104
Sorting and searching, 69 Summary, 5
Sorting and searching routines, 68 Superseded routines, 70
Source form SUPPRESS, 22
( See Language extensions ), 10 suppress, 38
SPLIT, 21 suspend, 105
split, 38 SXMPY, 70
sqrt, 64, 98 SYMDEBUG, 59
SQRT_V, 65 SYMDUMP, 59
SQRTINV_V, 65 symlink, 85
srandom, 85 SYMMETRIC, 22
ssbreak, 94 symmetric, 38
ssread, 94 sync, 85
sswrite, 94 SYNCDR, 57
STACK, 22 SYNCMS, 58
STACKSIZE, 111 syscall, 48
STACKSZ, 59
SN–2211 1.0 147
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

syslog, 85, 104 devacct, 91


system, 48 dmf_hashandle, 95
System and library calls dmf_offline, 95
differences, 105 dmf_vendor, 95
access, 105 dmmode, 95
fcntl, 106 dmofrq, 95
fstat, 108 dupmntent, 102
lstat, 108 endfsent, 102
open, 105, 106 endtosent, 100
profil, 108 endudb, 89
ptrace, 108 endusershell, 103
quotactl, 108 exctl, 94
socket, 108 _fcdlen, 102
stat, 108, 105 _fcdtocp, 102
file system, 92 feclearexcept, 98
I/O, 92 fedisabletrap, 98
included in API feenabletrap, 98
Standards, 85 fegetenv, 98
miscellaneous, 101 fegetexceptflag, 98
multilevel security, 95 fegetround, 98
not included in API, 104 fegettrapflag, 98
acctctl, 89 feholdexcept, 98
acctid, 89 feraiseexcept, 98
acid2nam, 89 fesetenv, 98
acidnamfree, 89 fesetexceptflag, 98
addudb, 89 fesetround, 98
airlog, 101 fesettrapflag, 98
atabort, 101 fetestexcept, 98
audctl, 95 fetesttrap, 98
authdes_create, 100 feupdateenv, 98
bsdsignal, 101 fgetln, 102
bsdsigpause, 102 fgetpal, 95
_btol, 102 fgetsn, 102
chacid, 92 findmntentry, 102
chdiri, 92 fjoin, 92
chkpnt, 93 freeconfval, 102
chmem, 94 freemntent, 102
cmptext, 95 freemntlist, 102
cpselect, 94 frexpf, 98
cpused, 102 frexpl, 98
cutimes, 102 fsecstat, 97
dacct, 91 fsetpal, 95
daemon, 102 getconfval, 102
deleteudb, 89
148 SN–2211 1.0
Index

getconfvals, 102 ialloc, 92


getdevn, 92 inet_subnetmaskof, 100
getfacl, 96 inet_subnetof, 100
getfsent, 102 jacct, 90
getfsfile, 102 join, 92
getfsspec, 102 killm, 103
getfstype, 102 ldexpf, 98
gethost, 100 ldexpl, 98
gethostlookup, 100 limit, 90
getinfo, 102 limits, 91
getinfomsg, 102 listio, 92
getjtab, 90 listmntent, 102
getlim, 90 loaded, 103
_getlwpid, 99 loaded_data, 103
_getlwppid, 99 lockudb, 89
getmntinfo, 102 logname, 103
getmount, 103 lsecstat, 97
getoptlst, 103 lsetattr, 92
getpal, 96 _ltob, 102
getpermit, 90 _lwp_alarm, 99
getportbm, 101 _lwp_exit, 99
getppriv, 96 _lwp_kill, 99
getsectab, 96 _lwp_killm, 99
getsysudb, 89 malloc_brk, 103
getsysv, 96 malloc_check, 103
gettosbyname, 100 malloc_error, 103
gettosent, 100 malloc_expand, 103
gettrustedudb, 89 malloc_extend, 103
getudb, 89 malloc_howbig, 103
getudbchain, 89 malloc_inplace, 103
getudbdefault, 89 malloc_isvalid, 103
getudbnam, 89 malloc_limit, 103
getudbstat, 89 malloc_space, 103
getudbtmap, 89 malloc_stats, 103
getudbuid, 89 memstride, 103
getusershell, 103 memwchr, 103
getusrv, 96 memwcmp, 103
gid2nam, 89 memwcpy, 103
gidnamfree, 89 memwset, 103
guestctl, 103 mldlist, 96
ia_failure, 96 mldname, 96
ia_mlsuser, 96 mldwalk, 96
ia_success, 96 mls_create, 96
ia_user, 96
SN–2211 1.0 149
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

mls_dominate, 96 recalla, 92
mls_equal, 96 recalls, 92
mls_export, 96 resch, 99
mls_extract, 96 restart, 93
mls_free, 96 resume, 105
mls_glb, 96 rewriteudb, 89
mls_import, 96 rmfacl, 96
mls_lub, 96 rtclock, 104
modfl, 98 sbreak, 104
mtimes, 99 schedv, 91
nam2acid, 89 sdsalloc, 94
nam2gid, 89 sdsfree, 94
nam2uid, 89 sdsinfo, 94
newexit, 99 sdsrealloc, 94
newgetpid, 99 secbits, 97
newgetppid, 99 secnames, 97
nicem, 103 secnums, 97
nlimit, 90 secstat, 97
nsecctl, 100 secwords, 97
openi, 92 setdevs, 97
parsetos, 100 setenv, 104
pathname, 103 setfacl, 96
policy, 91 setfcmp, 97
priv_clear_file, 96 setfflg, 97
priv_clear_proc, 96 setflvl, 97
priv_dup_file, 96 setfsent, 102
priv_free_file, 96 setjob, 90
priv_free_proc, 96 setlim, 90
priv_get_fd, 96 setloghost, 104
priv_get_file, 96 setlogname, 104
priv_get_file_flag, 96 setlogport, 104
priv_get_proc, 96 setpal, 96
priv_get_proc_flag, 96 setpermit, 90
priv_init_file, 96 setportbm, 101
priv_init_proc, 96 setppriv, 96
priv_set_fd, 96 setsysv, 96
priv_set_file, 96 settosent, 100
priv_set_file_flag, 96 setucat, 97
priv_set_proc, 96 setucmp, 97
priv_set_proc_flag, 96 setudb, 89
ptyrecon, 104 setudbdefault, 89
rcmdexec, 100 setudbpath, 89
reada, 92 setudbtmap, 89
recall, 92
150 SN–2211 1.0
Index

setulvl, 97 udbisopen, 89
setusershell, 103 uid2nam, 89
setusrv, 96 unlink2, 93
shfree, 104 unlockudb, 89
shfree_nb, 104 unsetenv, 104
shmalloc_check, 104 upanic, 105
shmalloc_nb, 104 vsnprintf, 104
shmalloc_stats, 104 waitjob, 90
shrealloc, 104 wracct, 91
shrealloc_nb, 104 writea, 93
shutdsav, 93 zeroudbstat, 89
sigctl, 104 System calls
sigoff, 104 ( See System and library calls ), 85
sigon, 104 System module
slgentry, 97 included in API
slgtrust, 97 PXF_DEFINITIONS, 26
slgtrustobj, 97 not included in API
snprintf, 104 CRI_IEEE_DEFINITIONS, 31
ssbreak, 94 FTN_IEEE_DEFINITIONS, 31
ssread, 94
sswrite, 94
strnrstrn, 104 T
strnstrn, 104
strrstr, 104 t_exit, 99
strtof, 104 t_fork, 99
strtold, 104 t_gettid, 99
suspend, 105 t_id, 99
t_exit, 99 t_lock, 100
t_fork, 99 t_nlock, 100
t_gettid, 99 t_ntestlock, 100
t_id, 99 t_nunlock, 100
t_lock, 100 t_testlock, 100
t_nlock, 100 t_tid, 99
t_ntestlock, 100 t_unlock, 100
t_nunlock, 100 Tab character, 11
t_testlock, 100 tabinfo, 105
t_tid, 99 tabread, 105
t_unlock, 100 tan, 65
tabinfo, 105 tanh, 65
tabread, 105 tape, 47
target, 94 TARGET, 111, 112
tfork, 100 target, 94, 112
_tfork, 99 TASK, 22
thread, 100
SN–2211 1.0 151
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

TASKCOMMON, 17 U
taskcommon, 36
Tasking U32, 54
toggles on/off, 22 U6064, 54
Tasking routines udbisopen, 89
( See Routines ), 56 uid2nam, 89
taskloop, 39 UNAME, 62
taskprivate, 38 UNICOS calls
taskshared, 38 ( See System and library calls ), 88
TEST_IEEE_EXCEPTION, 28 UNICOS/mk calls
TEST_IEEE_INTERRUPT, 28 ( See System and library calls ), 88
text, 48 _UNICOS, 43
tfork, 100 UNIT, 26
_tfork, 99 Unit identifier, 17
thread, 100 Units
tid, 99 Fortran extensions, 14
TIMEF, 52 unix, 43
tlock, 100 unlink2, 93
TMADW, 62 unlockudb, 89
TMAMU, 62 UNPACK, 62
TMATS, 62 UNROLL, 22
TMINIT, 62 unroll, 36
TMMSC, 62 unsetenv, 104
TMMVE, 62 upanic, 105
TMPDIR, 111 USCCTC, 53
TMPTC, 62 USCCTI, 53
TMPTS, 62 USDCTC, 55
TMSRC, 62 USDCTI, 55
TMVSC, 62 user, 48
TRACEBK, 59 USES_EREGS, 22
TRBK, 59 uses_eregs, 39
TRBKLVL, 59 USICTC, 55
TREMAIN, 59 USICTI, 55
truncate, 85 USICTP, 55
TSECND, 59, 63 USLCTC, 55
TSKLIST, 57 USLCTI, 55
TSKSTART, 63 USSCTC, 55
TSKTEST, 57 USSCTI, 55
TSKTUNE, 57 utimes, 85
TSKVALUE, 63
TSKWAIT, 63
ttyname_r, 87
ttyslot, 85
Typeless constants, 11
152 SN–2211 1.0
Index

V W

%VAL, 113 WAIO, 58


%VAL intrinsic, 16 WAITDR, 57
Variable length arrays, 34 waitjob, 90
Variables WAITMS, 58
common block, 17 WCLOSE, 58
redeclaration of, 12 WNL routines, 60
variables WOPEN, 58
dynamic wracct, 91
Fortran, 11 WRITDR, 57
VAX/VMS conversion procedures WRITE, 58
( See Routines ), 56 WRITE statement, 15
VAX2CRAY, 56 WRITE_MEMORY_BARRIER, 29
VBLAS, 70 _write_memory_barrier, 42
VECTOR, 22 writea, 91, 93
Vectorization WRITEC, 58
disabling for next loop, 21 WRITECP, 58
loop, 21 WRITEP, 58
search loops, 22 _writeSB, 42
toggles, 21, 22 _writeST, 42
VFUNCTION, 22 WRITMS, 58
vfunction, 39
VFUNCTIONS, 65
VLA X
( See variable length arrays ), 34
VLAPACK, 70 X/Open Single Unix Specification, 85
vms, 48 X/Open XPG4 standard, 85
VSEARCH, 22 XCRITADD, 57
vsnprintf, 104 XCRITMUL, 57
VXBCTC, 56 XFS file system, 91
VXBCTI, 56 XOR, 25
VXDCTC, 56 XOR, bitwise
VXDCTI, 56 on reals and integers, 14
VXGCTC, 56 XPFMT, 60
VXGCTI, 56 XSELFADD, 57
VXICTC, 56 XSELFMUL, 57
VXICTI, 56
VXLCTC, 56
VXLCTI, 56 Y
VXSCTC, 56
VXSCTI, 56 y0, 65
VXZCTC, 56, 57 y1, 65
VXZCTI, 56
SN–2211 1.0 153
Silicon Graphics/Cray Research Supercomputing Application Programming Interface (API)

yn, 65 Z

zeroudbstat, 89

154 SN–2211 1.0

You might also like