PAPI을 이용한 어플리케이션 flops 측정하기
작성일 : 2008년 3월 1일
작성자 : 서진우(alang@syszone.co.kr)
사용패키지 :
http://icl.cs.utk.edu/papi/
papi-3.5.0.tar.gz
http://www.csd.uu.se/~mikpe/linux/perfctr/
perfctr-2.6.x -> papi 패키지에도 포함되어 있음
http://perfsuite.ncsa.uiuc.edu/
perfsuite-0.6.2a6.tar.gz
1. perfctr 커널 패치 및 커널 업그레이드
# tar xzvf papi-3.5.0.tar.gz
# cd papi-3.5.0/src/perfctr-2.6.x/patches
# ls
.
.
patch-kernel-2.6.7
patch-kernel-2.6.8-rc2
patch-kernel-2.6.8.1
patch-kernel-2.6.9
patch-kernel-2.6.9-11.EL-redhat
patch-kernel-2.6.9-22.EL-redhat
patch-kernel-2.6.9-34.EL-redhat
patch-kernel-2.6.9-42.0.2.EL-redhat
patch-kernel-2.6.9-42.EL-redhat
patch-kernel-2.6.9-5.0.3.EL-redhat
perfctr에서 제공하는 패치와 동일한 커널 버전을 준비 한다.
Redhat의 경우 2.6.9-42.0.2.EL 이 최신 버전으로 해당 커널을 준비함.
# cd /usr/src/linux-2.6.9-42
# $PAPI_SRC_PATH/src/perfctr-2.6.x/update-kernel –test –patch=2.6.9-42.0.2.EL-redhat
패치 테스트가 모두 정상적이면, 실제 패치를 진행한다.
# $PAPI_SRC_PATH/src/perfctr-2.6.x/update-kernel –patch=2.6.9-42.0.2.EL-redhat
# cp configs/kernel-2.6.9-x86_64-smp.config .config
# make menuconfig
Processor type and features —>
Performance-monitoring counters support —>
<M> Performance monitoring counters support
x x [*] Additional internal consistency checks x x
x x [*] Init-time hardware tests x x
x x [*] Virtual performance counters support x x
x x [*] Global performance counters support x x
# make && make modules && make modules_install && make install
// reboot
2. PAPI, Perfctr 설치
# cd $PAPI_SRC_PATH/src
# ./configure –prefix=/usr/local/papi –with-perfctr=6 –with-arch=x86_64
# make && make install
// PATH, LD_LIBRIRY_PATH 에 papi 추가
# cd perfctr-2.6.x
# make PREFIX=/usr/local/papi install
3. Perfsuite 설치
# cd perfsuite-0.6.2a6
# ./configure –with-papi=/usr/local/papi –enable-mpi F77=ifort MPICPPFLAGS=”-I/engrid/enhpc/mpich/intel/include”
# make
# make -s check
# make install
4. psrun 사용하기
# psrun -c /usr/local/share/perfsuite/xml/pshwpc/papi3_p6.xml -F text ./sinv.e
2 Responses
3antithesis
3lugubrious