LinuxCommandLibrary

mpicc

compiles MPI C programs

TLDR

Compile MPI C program

$ mpicc -o [program] [source.c]
copy
Compile with optimization
$ mpicc -O2 -o [program] [source.c]
copy
Show compiler command
$ mpicc --showme [source.c]
copy

SYNOPSIS

mpicc [options] sourcefiles_...

DESCRIPTION

mpicc compiles MPI C programs. Wrapper around system C compiler with MPI includes and libraries. Automatically links MPI libraries.

PARAMETERS

-o file

Output file name.
-O level
Optimization level.
--showme
Show underlying compiler command.
-I dir
Include directory.
-L dir
Library directory.

SEE ALSO

mpirun(1), mpic++(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community