LinuxCommandLibrary

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++ compiles MPI C++ programs. Wrapper around system C++ compiler with MPI includes and libraries. Automatically links MPI libraries. Alias for mpicxx.

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).

SEE ALSO

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community