Sun Logo

OpenMP API User's Guide

Suntrademark Studio 11




Before You Begin

Typographic Conventions

Shell Prompts

Supported Platforms

Accessing Sun Studio Software and Man Pages

Accessing Compilers and Tools Documentation

Accessing Related Solaris Documentation

Resources for Developers

Contacting Sun Technical Support

Sending Your Comments

1. Introducing the OpenMP API

1.1 Where to Find the OpenMP Specifications

1.2 Special Conventions Used Here

2. Nested Parallelism

2.1 The Execution Model

2.2 Control of Nested Parallelism




2.3 Using OpenMP Library Routines Within Nested Parallel Regions

2.4 Some Tips on Using Nested Parallelism

3. Automatic Scoping of Variables

3.1 The Autoscoping Data Scope Clause

3.1.1 __AUTO Clause

3.1.2 DEFAULT(__AUTO) Clause

3.2 Scoping Rules

3.2.1 Scoping Rules For Scalar Variables

3.2.2 Scoping Rules for Arrays

3.3 General Comments About Autoscoping

3.3.1 Autoscoping Rules for Fortran 95:

3.3.2 Autoscoping Rules for C/C++:

3.4 Checking the Results of Autoscoping

3.5 Known Limitations of the Current Implementation

4. Implementation-Defined Behaviors

5. Compiling for OpenMP

5.1 Compiler Options To Use

5.2 Fortran 95 OpenMP Validation

5.3 OpenMP Environment Variables

5.4 Processor Binding

5.5 Stacks and Stack Sizes

6. Converting to OpenMP

6.1 Converting Legacy Fortran Directives

6.1.1 Converting Sun-Style Fortran Directives

6.1.2 Converting Cray-Style Fortran Directives

6.2 Converting Legacy C Pragmas

6.2.1 Issues Between Legacy C Pragmas and OpenMP

7. Performance Considerations

7.1 Some General Recommendations

7.2 False Sharing And How To Avoid It

7.2.1 What Is False Sharing?

7.2.2 Reducing False Sharing

7.3 Operating System Tuning Features

A. Placement of Clauses on Directives