HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

mpicc — Open MPI C wrapper compiler. More information: <https://www.mpich.org/static/docs/latest/www1/mpicc.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
mpicccommandclimpiopencompilerwrappermore

Problem

How to use the mpicc command: Open MPI C wrapper compiler. More information: <https://www.mpich.org/static/docs/latest/www1/mpicc.html>.

Solution

mpicc — Open MPI C wrapper compiler. More information: <https://www.mpich.org/static/docs/latest/www1/mpicc.html>.

Compile a source code file into an object file:
mpicc -c {{path/to/file}}.c


Link an object file and make an executable:
mpicc -o {{executable}} {{path/to/object_file}}.o


Compile and link source code in a single command:
mpicc -o {{executable}} {{path/to/file}}.c

Code Snippets

Compile a source code file into an object file

mpicc -c {{path/to/file}}.c

Link an object file and make an executable

mpicc -o {{executable}} {{path/to/object_file}}.o

Compile and link source code in a single command

mpicc -o {{executable}} {{path/to/file}}.c

Context

tldr-pages: common/mpicc

Revisions (0)

No revisions yet.