LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mpic++

compiles MPI C++ programs

TLDR

Compile MPI C++ program
$ mpic++ -o [program] [source.cpp]
copy
Compile with optimization
$ mpic++ -O2 -o [program] [source.cpp]
copy
Show compiler command
$ mpic++ --showme [source.cpp]
copy

SYNOPSIS

mpic++ [options] sourcefiles_...

DESCRIPTION

mpic++ is a compiler driver shipped with MPI implementations (Open MPI, MPICH, MVAPICH, Intel MPI) that invokes the underlying system C++ compiler with the include paths, library paths, and link libraries needed to build MPI programs. It is the C++ counterpart to mpicc and is typically a symlink or alias to mpicxx.The wrapped compiler can be overridden via the `OMPICXX` (Open MPI) or `MPICHCXX` (MPICH) environment variable, allowing the same wrapper to drive `g++`, `clang++`, `icpx`, etc.

PARAMETERS

-o file

Output file name.
-O level
Optimization level.
--showme
Show underlying compiler command.
-I dir
Include directory.
-L dir
Library directory.
-std= standard
C++ standard version (c++11, c++14, c++17, c++20).
-show
Print the underlying compiler command line that would be invoked, then exit (MPICH-style).
--showme:compile / --showme:link / --showme:command
Print only the compile flags, only the link flags, or only the wrapped compiler name (Open MPI).

INSTALL

sudo apk add openmpi-dev
copy

CAVEATS

The flags injected by the wrapper depend on the MPI implementation; do not rely on `--showme` semantics being identical between Open MPI and MPICH. Mixing object files compiled with different MPI wrappers is unsafe.

SEE ALSO

mpirun(1), mpicxx(1), mpicc(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid