File: oshmem-wrapper-compiler.1

package info (click to toggle)
openmpi 5.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,684 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (256 lines) | stat: -rw-r--r-- 9,420 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
.\" Man page generated from reStructuredText.
.
.TH "OSHMEM-WRAPPER-COMPILER" "1" "May 30, 2025" "" "Open MPI"
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.sp
oshcc, oshcxx, oshc++, oshfort, shmemcc, shmemcxx, shmemc++, shmemfort — OpenSHMEM wrapper compilers
.SH SYNTAX
.sp
\fBoshcc [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBoshcxx [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBoshc++ [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBoshfort [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBshmemcc [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBshmemcxx [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBshmemc++ [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.sp
\fBshmemfort [\-\-showme | \-\-showme:compile | \-\-showme:link] ...\fP
.SH OPTIONS
.sp
The options below apply to all of the wrapper compilers:
.INDENT 0.0
.IP \(bu 2
\fB\-\-showme\fP: This option comes in several different variants (see
below). None of the variants invokes the underlying compiler; they
all provide information on how the underlying compiler would have
been invoked had \fB\-\-showme\fP not been used. The basic \fB\-\-showme\fP
option outputs the command line that would be executed to compile
the program.
.sp
\fBNOTE:\fP
.INDENT 2.0
.INDENT 3.5
If a non\-filename argument is passed on the command line,
the \fB\-\-showme\fP option will \fInot\fP display any additional
flags. For example, both \fB"oshcc \-\-showme\fP and
\fBoshcc \-\-showme my_source.c\fP will show all the
wrapper\-supplied flags. But \fBoshcc
\-\-showme \-v\fP will only show the underlying compiler name
and \fB\-v\fP\&.
.UNINDENT
.UNINDENT
.IP \(bu 2
\fB\-\-showme:compile\fP: Output the compiler flags that would have been
supplied to the underlying compiler.
.IP \(bu 2
\fB\-\-showme:link\fP: Output the linker flags that would have been
supplied to the underlying compiler.
.IP \(bu 2
\fB\-\-showme:command\fP: Outputs the underlying compiler
command (which may be one or more tokens).
.IP \(bu 2
\fB\-\-showme:incdirs\fP: Outputs a space\-delimited (but otherwise
undecorated) list of directories that the wrapper compiler would
have provided to the underlying compiler to indicate
where relevant header files are located.
.IP \(bu 2
\fB\-\-showme:libdirs\fP: Outputs a space\-delimited (but otherwise
undecorated) list of directories that the wrapper compiler would
have provided to the underlying linker to indicate where relevant
libraries are located.
.IP \(bu 2
\fB\-\-showme:libs\fP Outputs a space\-delimited (but otherwise
undecorated) list of library names that the wrapper compiler would
have used to link an application. For example: \fBmpi open\-pal
util\fP\&.
.IP \(bu 2
\fB\-\-showme:version\fP: Outputs the version number of Open MPI.
.IP \(bu 2
\fB\-\-showme:help\fP: Output a brief usage help message.
.UNINDENT
.sp
See the man page for your underlying compiler for other
options that can be passed through oshcc.
.SH DESCRIPTION
.sp
Conceptually, the role of these commands is quite simple: transparently
add relevant compiler and linker flags to the user’s command line that
are necessary to compile / link OpenSHMEM programs, and then invoke the
underlying compiler to actually perform the command.
.sp
As such, these commands are frequently referred to as “wrapper”
compilers because they do not actually compile or link applications
themselves; they only add in command line flags and invoke the back\-end
compiler.
.SH BACKGROUND
.sp
Open MPI provides wrapper compilers for several languages:
.INDENT 0.0
.IP \(bu 2
\fBoshcc\fP, \fBshmemcc\fP: C
.IP \(bu 2
\fBoshc++\fP, \fBoshcxx\fP, \fBshmemc++\fP, shmemcxx\(ga:: C++
.IP \(bu 2
\fBoshfort\fP, \fBshmemfort\fP: Fortran
.UNINDENT
.sp
The wrapper compilers for each of the languages are identical; they
can be use interchangeably.  The different names are provided solely
for backwards compatibility.
.SH FORTRAN NOTES
.sp
The Fortran wrapper compiler for OpenSHMEM (\fBoshfort\fP and
\fBshmemfort\fP) can compile and link OpenSHMEM applications that use
any/all of the OpenSHMEM Fortran bindings.
.sp
Note, however, that the Fortran compiler may require additional
command\-line options to enforce a specific Fortran dialect. For
example, in some versions of the IBM XLF compiler, if \fBxlf90\fP is the
underlying Fortran compiler, \fB\-qfixed\fP may be necessary to compile
fixed\-format Fortran source files.
.sp
Finally, note that \fBoshfort\fP will be inoperative and will return an
error on use if Fortran support was not built into the OpenSHMEM
layer.
.SH OVERVIEW
.sp
\fBoshcc\fP and \fBshmemcc\fP are convenience wrappers for the underlying
C compiler.  Translation of an OpenSHMEM program requires the linkage
of the OpenSHMEM\-specific libraries which may not reside in one of the
standard search directories of \fBld(1)\fP\&. It also often requires the
inclusion of header files what may also not be found in a standard
location.
.sp
\fBoshcc\fP and \fBshmemcc\fP pass their arguments to the underlying C
compiler along with the \fB\-I\fP, \fB\-L\fP and \fB\-l\fP options required by
OpenSHMEM programs.
.sp
The same is true for all the other language wrapper compilers.
.sp
The OpenSHMEM Team \fIstrongly\fP encourages using the wrapper compilers
instead of attempting to link to the OpenSHMEM libraries manually. This
allows the specific implementation of OpenSHMEM to change without
forcing changes to linker directives in users’ Makefiles. Indeed, the
specific set of flags and libraries used by the wrapper compilers
depends on how OpenSHMEM was configured and built; the values can change
between different installations of the same version of OpenSHMEM.
.sp
Indeed, since the wrappers are simply thin shells on top of an
underlying compiler, there are very, very few compelling reasons \fInot\fP
to use \fBoshcc\fP\&. When it is not possible to use the wrappers
directly, the \fB\-\-showme:compile\fP and \fB\-\-showme:link\fP options should be
used to determine what flags the wrappers would have used. For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
shell$ cc \-c file1.c \(gashmemcc \-\-showme:compile\(ga

shell$ cc \-c file2.c \(gashmemcc \-\-showme:compile\(ga

shell$ cc file1.o file2.o \(gashmemcc \-\-showme:link\(ga \-o my_oshmem_program
.ft P
.fi
.UNINDENT
.UNINDENT
.SH NOTES
.sp
It is possible to make the wrapper compilers multi\-lib aware. That is,
the libraries and includes specified may differ based on the compiler
flags specified (for example, with the GNU compilers on Linux, a
different library path may be used if \fB\-m32\fP is seen versus \fB\-m64\fP
being seen). This is not the default behavior in a standard build, but
can be activated (for example, in a binary package providing both 32
and 64 bit support). \fI\%More information can be found here\fP\&.
.SH FILES
.sp
The strings that the wrapper compilers insert into the command line
before invoking the underlying compiler are stored in a text file
created by OpenSHMEM and installed to
\fB$pkgdata/NAME\-wrapper\-data.txt\fP, where:
.INDENT 0.0
.IP \(bu 2
\fB$pkgdata\fP is typically \fB$prefix/share/openmpi\fP
.IP \(bu 2
\fB$prefix\fP is the top installation directory of OpenSHMEM
.IP \(bu 2
\fBNAME\fP is the name of the wrapper compiler (e.g.,
\fB$pkgdata/shmemcc\-wrapper\-data.txt\fP)
.UNINDENT
.sp
It is rarely necessary to edit these files, but they can be examined to
gain insight into what flags the wrappers are placing on the command
line.
.SH ENVIRONMENT VARIABLES
.sp
By default, the wrappers use the compilers that were selected when
OpenSHMEM was configured. These compilers were either found
automatically by Open MPI’s “configure” script, or were selected by
the user in the \fBCC\fP, \fBCXX\fP, and/or \fBFC\fP environment variables
before \fBconfigure\fP was invoked. Additionally, other arguments specific
to the compiler may have been selected by configure.
.sp
These values can be selectively overridden by either editing the text
files containing this configuration information (see the \fI\%FILES\fP section), or by setting selected
environment variables of the form \fBoshmem_value\fP\&.
.sp
Valid value names are:
.INDENT 0.0
.IP \(bu 2
\fBCPPFLAGS\fP: Flags added when invoking the preprocessor (C or C++)
.IP \(bu 2
\fBLDFLAGS\fP: Flags added when invoking the linker (C, C++, or
Fortran)
.IP \(bu 2
\fBLIBS\fP: Libraries added when invoking the linker (C, C++, or
Fortran)
.IP \(bu 2
\fBCC\fP: C compiler
.IP \(bu 2
\fBCFLAGS\fP: C compiler flags
.IP \(bu 2
\fBCXX\fP: C++ compiler
.IP \(bu 2
\fBCXXFLAGS\fP: C++ compiler flags
.IP \(bu 2
\fBFC\fP: Fortran compiler
.IP \(bu 2
\fBFCFLAGS\fP: Fortran compiler flags
.UNINDENT
.SH COPYRIGHT
2003-2025, The Open MPI Community
.\" Generated by docutils manpage writer.
.