使用mpiP测mpi并行程序性能 1. 安装mpiP 1.1 网上下载安装 http://mpip.sourceforge.net/ 1.2 修改 在kd50上安装mpiP-3.1.1版本,configure后,make有错误,修改如下: (1)mpiPi.h文件,把 #elif defined(mips) && defined(__GNUC__) #define ParentFP(jb) (0) #define FramePC(fp) (0) #define NextFP(fp) (0) extern void *saved_ret_addr; 放到 #elif defined(Linux) && defined(IA32) #define ParentFP(jb) ((void*) jb[0].__jmpbuf[3]) #define FramePC(fp) ((void*)(((void**)fp)[1])) #define NextFP(fp) ((void*)((void**)fp)[0]) 的前面。 (2)glob.c文件中,添加 void *saved_ret_addr = NULL; 2. 使用mpiP 2.1 编译 mpicxx -g p_pi.c -L/home/pub/xiaoga/mpiP-3.1.1/lib -lmpiP -liberty 2.2 运行 mpiexec -machinefile $PBS_NODEFILE -np $NPROCS ./a.out 2.3 分析 运行结束后,生成数据文件a.out.64.2000.1.mpiP。