Linux command
mpicc 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Compile MPI C program
mpicc -o [program] [source.c]
Compile with optimization
mpicc -O2 -o [program] [source.c]
Show compiler command
mpicc --showme [source.c]
说明
mpicc compiles MPI C programs. Wrapper around system C compiler with MPI includes and libraries. Automatically links MPI libraries.
参数
- -o _file_
- Output file name.
- -O _level_
- Optimization level.
- --showme
- Show underlying compiler command.
- -I _dir_
- Include directory.
- -L _dir_
- Library directory.
FAQ
What is the mpicc command used for?
mpicc compiles MPI C programs. Wrapper around system C compiler with MPI includes and libraries. Automatically links MPI libraries.
How do I run a basic mpicc example?
Run `mpicc -o [program] [source.c]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _file_ do in mpicc?
Output file name.