Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-45l2p Total loading time: 0 Render date: 2024-04-30T03:46:00.081Z Has data issue: false hasContentIssue false

SGI Example

Published online by Cambridge University Press:  12 December 2009

Ronald W. Shonkwiler
Affiliation:
Georgia Institute of Technology
Lew Lefton
Affiliation:
Georgia Institute of Technology
Get access

Summary

The SGI Power C compiler (PCA) does not allow more threads than processors (cf. the document “Multiprocessing C Compiler Directives”). In this sense, programs execute like the fork() programming model.

The keyword critical corresponds most closely with mutex in that only one thread at a time can execute this code and all threads execute it. The keyword synchronize corresponds most closely with barrier in that all threads must arrive at this point before any thread can go on.

There are also additional directives. The directive one processor means that the first thread to reach this code executes it meanwhile other threads wait. After execution by the first thread, the code is skipped by subsequent threads. There is an enter gate and corresponding exit gate directive. Threads must wait at the exit gate until all threads have passed the matching enter gate.

Loops to run in parallel must be marked with the pfor directive. It takes the argument iterate (start index; number of times through the loop; increment/decrement amount).

A reduction variable is local to each thread and their contributions must be added in a critical section.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2006

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • SGI Example
  • Ronald W. Shonkwiler, Georgia Institute of Technology, Lew Lefton, Georgia Institute of Technology
  • Book: An Introduction to Parallel and Vector Scientific Computation
  • Online publication: 12 December 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511617935.017
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • SGI Example
  • Ronald W. Shonkwiler, Georgia Institute of Technology, Lew Lefton, Georgia Institute of Technology
  • Book: An Introduction to Parallel and Vector Scientific Computation
  • Online publication: 12 December 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511617935.017
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • SGI Example
  • Ronald W. Shonkwiler, Georgia Institute of Technology, Lew Lefton, Georgia Institute of Technology
  • Book: An Introduction to Parallel and Vector Scientific Computation
  • Online publication: 12 December 2009
  • Chapter DOI: https://doi.org/10.1017/CBO9780511617935.017
Available formats
×