
6
–
SHMEM Description and Configuration
SHMEM Programs
6-4
IB0054606-02 A
The
%
character in the previous example is used to indicate the shell prompt and
is followed by a command. The program can be compiled and linked using the
shmemcc
wrapper script:
% shmemcc shmem_world.c -o shmem_world
The program can be run using the
shmemrun
wrapper script:
% shmemrun -m hosts -np 2 ./shmem_world
Hello from PE 1 out of 2
Hello from PE 0 out of 2
This script assumes a
hosts
file is available, containing the host names on which
the program is run. The
-np
option is used to specify the number of processing
elements (PEs) to be run (for example, 2).
Compiling SHMEM Programs
The
shmemcc
script is a wrapper script for the compilation of the SHMEM C
programs. The main purpose of the script is to call the C compiler with additional
options to specify the SHMEM include directory, the SHMEM library directory, and
to appropriately link in the SHMEM library. The
shmemcc
script automatically
determines the correct directories by finding them relative to its own location. The
standard directory layout of the QLogic SHMEM software is assumed.
The default C compiler is gcc, and can be overridden by specifying a compiler with
the
$SHMEM_CC
environment variable.
If the option
-show
is added to the
shmemcc
command, it displays the command
line that would be used to invoke the C compiler, but the C compiler will not be
invoked. All other arguments to
shmemcc
are passed through to the C compiler
without modification.
The C compiler can be used directly without using
shmemcc
. In that case the user
must add the following to the command line:
For compilations add the following option:
-I
$SHMEM_DIR
/include
For linkages add the following options:
NOTE
These instructions assume a standard SHMEM installation and that
/usr/shmem/qlogic/bin
has been added to the $PATH.
Summary of Contents for OFED+ Host
Page 1: ...IB0054606 02 A OFED Host Software Release 1 5 4 User Guide...
Page 14: ...xiv IB0054606 02 A OFED Host Software Release 1 5 4 User Guide...
Page 22: ...1 Introduction Interoperability 1 4 IB0054606 02 A...
Page 96: ...4 Running MPI on QLogic Adapters Debugging MPI Programs 4 24 IB0054606 02 A...
Page 140: ...6 SHMEM Description and Configuration SHMEM Benchmark Programs 6 32 IB0054606 02 A...
Page 148: ...8 Dispersive Routing 8 4 IB0054606 02 A...
Page 164: ...9 gPXE HTTP Boot Setup 9 16 IB0054606 02 A...
Page 176: ...A Benchmark Programs Benchmark 3 Messaging Rate Microbenchmarks A 12 IB0054606 02 A...
Page 202: ...B SRP Configuration OFED SRP Configuration B 26 IB0054606 02 A Notes...
Page 206: ...C Integration with a Batch Queuing System Clean up PSM Shared Memory Files C 4 IB0054606 02 A...
Page 238: ...E ULP Troubleshooting Troubleshooting SRP Issues E 20 IB0054606 02 A...
Page 242: ...F Write Combining Verify Write Combining is Working F 4 IB0054606 02 A Notes...
Page 280: ...G Commands and Files Summary of Configuration Files G 38 IB0054606 02 A...
Page 283: ......