MPI分析程序Integrated Performance Monitoring for HPC(IPM)安装指南

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


前言

高性能计算集成性能监控Integrated Performance Monitoring for HPC(IPM) 是专门针对MPI程序设计的通信与性能监测器,该monitor除了可以查看每个函数的运行时间以外,还可以查看每个通信函数的时间,是用于MPI程序调优的开源利器。github上的官方传送门
下图是IPM监测CESM运行过程的结果图
示意图


一、依赖环境安装

对于centos系统,需要准备以下安装包

yum install autoconf
yum install automake
yum install libtool
yum install libpng-devel
yum install libmxml

ubuntu系统按照对应的包修改成apt-get install的版本即可

二、安装Ploticus

这个软件用来画图的,硬核玩家觉得不需要各种统计图可以略过,不然还是建议搞一下
下载

wget https://jaist.dl.sourceforge.net/project/ploticus/ploticus/2.42/ploticus242_src.tar.gz

解压并安装

tar xvf ploticus242_src.tar.gz
cd ploticus242/src
make

将以下语句加入~/.bashrc

export PATH=/path/to/ploticus242/src:$PATH

三、主程序安装

代码如下(示例):

下载并快速安装

git clone https://github.com/nerscadmin/IPM.git IPM-master
cd IPM-master
./bootstrap.sh

接着进行configure操作

./configure –prefix=/path/to/IPM --enable-coll-details --enable-parser

在utils/Makefile里的LIBS中添加 -lmxml 和 -lpthread
如果报错提示无法找到-lmxml,请先安装mxml,安装方法在后面
编译安装

make && make install

接着修改~/.bashrc

export PATH=/path/to/ploticus242/src:/path/to/mxml/bin:/path/to/IPM/bin:$PATH
export LD_LIBRARY_PATH=/path/to/mxml/lib:/path/to/IPM/lib:$LD_LIBRARY_PATH
export MANPATH=/home/cesmtest/CESM/IPM/IPM-master/utils/mxml/include:$MANPATH
export IPM_REPORT=full
export IPM_REPORT_MEM=yes
export IPM_LOG=full
export IPM_KEYFILE=/path/to/IPM/ipm_key_mpi

到此为止就算是安装好了

四、mxml安装

参考这个
https://blog.csdn.net/Travelerwz/article/details/82696673

五、使用

使用IPM需要将IPM编译进程序中

1.编译程序

该方法需要将IPM加入到编译选项中,编译MPI程序的时候在编译选项里加入

mpicc my_code.c -o my_code.x -L/path/to/IPM/lib -lipm -lipmf

其中-lipmf是fortran情况下需要加的

2.生成报告

按原先方式执行程序,当前目录下会生成xml文件,类似:root.1524511933.141544.ipm.xml,执行:

ipm_parse –html root.1524511933.141544.ipm.xml

即可生成报告
报告如下
完整IPM报告

猜你喜欢

转载自blog.csdn.net/weixin_43934886/article/details/130711975