测试Open MPI的安装
命令"ompi_info"可用来检测Open MPI的安装状态。该命令会返回
一个关于你的Open MPI安装的大概信息。
Note that the ompi_info command
is
extremely helpful in determining which components are installed as well
as
listing all the run-time settable parameters that are available in each
component (as well as their default values).
下列选项可能会有用:
--allShow a *lot* of information about your Open MPI installation.
--parsableDisplay all the information in an easily grep/cut/awk/sed-able
format.
--param
A of
"all" and a of "all" will show all
parameters to all components.Otherwise,
the parameters of all the components in a specific framework, or just
the
parameters of a specific component can be displayed by using an
appropriate
and/or name.
Changing the values of these
parameters is
explained in the "The Modular Component Architecture (MCA)" section,
below.
编译Open MPI应用
Open MPI提供了可用来编译MPI应用的"wrapper"编译器:
C:mpicc
C++:mpiCC (or mpic++ if your filesystem is case-insensitive)
Fortran 77: mpif77
Fortran 90: mpif90
例如:
shell$ mpicc hello_world_mpi.c
-o
hello_world_mpi -g
All the wrapper compilers do is
add a
variety of compiler and linker flags to the command line and then invoke
a
back-end compiler.To be specific: the
wrapper compilers do not parse sourc