UK National HPC Service

Computer Services for Academic Research Logo
Home | Helpdesk | Machine Status | Search | Apply
 

SHMEM

Overview

SHMEM refers to the shared memory access library available on Cray and SGI machines (and others). SHMEM contrasts with message passing via MPI or PVM, in which a message is sent in a two-step process: the source processor makes a call to send the data and the remote processor makes a call to receive it. Cooperation is required between two processors in that the destination processor must make a library call to accept the data before using it.

With SHMEM, the sending of data involves only one CPU in that the source processor simply puts that data into the memory of the destination processor. Likewise, a processor can read data from another processor's memory without interrupting the remote CPU. The remote processor is not made aware that its memory has been read or written, unless the programmer implements a mechanism to accomplish this. The procedure calls have lower latency and higher bandwidth than MPI calls and can be used to optimise communication intensive sections of an MPI code to produce better scalability.

Restrictions on Use

There are no restrictions on use and is available on all our SGI machines.

Set Up Procedure

SHMEM is part of the mpt (message passing toolkit) suite provided by SGI and can be accessed using modules. When you log in you will have a default mpt module loaded but you may wish to switch to a newer module.

Running the Code

Once SHMEM calls have been added to your code you will need to link in the SHMEM library (-lsma on the command line).

Further Information

Further information is available at:

Page maintained by This page last updated: Tuesday, 17-Aug-2004 15:33:20 BST