OSHMEM-WRAPPER-COMPILER(1)
π OSHMEM-WRAPPER-COMPILER(1) β bestie edition
okay so this is a page from the Open MPI manual (yes, that Open MPI, hiii π) and it's all about the OpenSHMEM wrapper compilers. The star roster of names is:
oshcc, oshcxx, oshc++, oshfort, shmemcc, shmemcxx, shmemc++, shmemfort β the OpenSHMEM wrapper compilers, periodt.
β¨ SYNTAX β¨
like, here's the whole menu of ways you can call them:
oshcc [--showme | --showme:compile | --showme:link] ...
oshcxx [--showme | --showme:compile | --showme:link] ...
oshc++ [--showme | --showme:compile | --showme:link] ...
oshfort [--showme | --showme:compile | --showme:link] ...
shmemcc [--showme | --showme:compile | --showme:link] ...
shmemcxx [--showme | --showme:compile | --showme:link] ...
shmemc++ [--showme | --showme:compile | --showme:link] ...
shmemfort [--showme | --showme:compile | --showme:link] ...
π OPTIONS π
every single one of these bad boys works on all of the wrapper compilers, no cap:
--showmeβ this one comes in several different variants (keep scrolling, bestie, they're all listed below). None of the variants actually invokes the underlying compiler; they all just tell you how the underlying compiler would have been invoked if you hadn't used--showme. The basic--showmeoption outputs the command line that would be executed to compile the program.
NOTE: if a non-filename argument is passed on the command line, the--showmeoption will not display any additional flags. For example, bothoshcc --showmeandoshcc --showme my_source.cwill show all the wrapper-supplied flags. Butoshcc --showme -vwill only show the underlying compiler name and-v. π like it said what it said.
--showme:compileβ outputs the compiler flags that would have been supplied to the underlying compiler.--showme:linkβ outputs the linker flags that would have been supplied to the underlying compiler.--showme:commandβ outputs the underlying compiler command (which may be one or more tokens).--showme:incdirsβ 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.--showme:libdirsβ 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.--showme:libsβ outputs a space-delimited (but otherwise undecorated) list of library names that the wrapper compiler would have used to link an application. For example:mpi open-pal util.--showme:versionβ outputs the version number of Open MPI.--showme:helpβ output a brief usage help message.
and hiii, for other options you can pass through oshcc, go read the man page for your underlying compiler π«Ά
π¦ DESCRIPTION π¦
conceptually? the role of these commands is genuinely so simple it's giving main character energy: transparently add the 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.
so yeah, that's exactly why these commands are frequently referred to as "wrapper" compilers β they don't actually compile or link applications themselves; they only add in command line flags and invoke the back-end compiler. they're the hype squad, not the player. β¨
πΈ BACKGROUND πΈ
Open MPI provides wrapper compilers for several languages:
oshcc,shmemcc: Coshc++,oshcxx,shmemc++,shmemcxx: C++oshfort,shmemfort: Fortran
the wrapper compilers for each of the languages are identical; they can be used interchangeably. the different names are provided solely for backwards compatibility. iykyk π
π§ FORTRAN NOTES π§
the Fortran wrapper compiler for OpenSHMEM (oshfort and shmemfort) can compile and link OpenSHMEM applications that use any/all of the OpenSHMEM Fortran bindings.
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 xlf90 is the underlying Fortran compiler, -qfixed may be necessary to compile fixed-format Fortran source files.
finally, note that oshfort will be inoperative and will return an error on use if Fortran support was not built into the OpenSHMEM layer. π so like, check that first bestie.
β OVERVIEW β
oshcc and shmemcc 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 ld(1). it also often requires the inclusion of header files what may also not be found in a standard location.
oshcc and shmemcc pass their arguments to the underlying C compiler along with the -I, -L and -l options required by OpenSHMEM programs.
the same is true for all the other language wrapper compilers. π
the OpenSHMEM Team strongly 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. (yes literally the same version. no cap.)
indeed, since the wrappers are simply thin shells on top of an underlying compiler, there are very, very few compelling reasons not to use oshcc. when it is not possible to use the wrappers directly, the --showme:compile and --showme:link options should be used to determine what flags the wrappers would have used. for example:
shell$ cc -c file1.c `shmemcc --showme:compile`
shell$ cc -c file2.c `shmemcc --showme:compile`
shell$ cc file1.o file2.o `shmemcc --showme:link` -o my_oshmem_program
ate. π
π NOTES π
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 -m32 is seen versus -m64 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). more information can be found here.
π FILES π
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 $pkgdata/NAME-wrapper-data.txt, where:
$pkgdatais typically$prefix/share/openmpi$prefixis the top installation directory of OpenSHMEMNAMEis the name of the wrapper compiler (e.g.,$pkgdata/shmemcc-wrapper-data.txt)
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. peek but don't touch vibes π
π₯ ENVIRONMENT VARIABLES π₯
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 CC, CXX, and/or FC environment variables before configure was invoked. additionally, other arguments specific to the compiler may have been selected by configure.
these values can be selectively overridden by either editing the text files containing this configuration information (see the FILES section), or by setting selected environment variables of the form oshmem_value.
valid value names are:
CPPFLAGS: flags added when invoking the preprocessor (C or C++)LDFLAGS: flags added when invoking the linker (C, C++, or Fortran)LIBS: libraries added when invoking the linker (C, C++, or Fortran)CC: C compilerCFLAGS: C compiler flagsCXX: C++ compilerCXXFLAGS: C++ compiler flagsFC: Fortran compilerFCFLAGS: Fortran compiler flags
π COPYRIGHT π
2003-2026, The Open MPI Community
and that's the whole page, bestie β mwah π this was OSHMEM-WRAPPER-COMPILER(1), dated Sep 11, 2026, brought to you by the Open MPI crew (copyright 2003-2026, The Open MPI Community). go compile something iconic π¦β¨
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms