私はライオンとxcode 4.2を使用しています。macports を使用して openmpi をインストールしました。すべて正常にインストールされました。
ただし、例をコンパイルするためにどのライブラリをどのように含めるかを教えてくれるガイドが見つかりません(以下を参照)
#include <mpi.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
int numprocs;
int myid;
MPI_Status stat;
/* all MPI programs start with MPI_Init */
MPI_Init(&argc,&argv);
/* Comm_size tells us how many processes there are */
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
/* Comm_rank finds the rank of the process */
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
/* Print out a message */
printf("Hello world, from process %d of %d\n", myid, numprocs);
/* MPI Programs end with MPI Finalize; this is a weak synchronization point */
MPI_Finalize();
return 0;
}
Xcode は、mpi.h が見つからないことを報告します。