ubuntu安装openmpi的Address not mapped 错误
2010年4月8日 阅读(1,365)
在我的ubuntu上安装了openmpi,编译一个简单程序如下:
#include "mpi.h"
#include <stdio.h>
#include <math.h>
int main(int argc,char ** argv)
{
int myid, numprocs;
int namelen;
int type_size;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Get_processor_name(processor_name,&namelen);
fprintf(stderr,"Hello World! Process %d of %d on %s\n",myid, numprocs, processor_name);