120 likes | 294 Views
BSC tools hands-on session. Objectives. Copy ~nct00001/ tools -material into your ${HOME} cp –r ~nct00001/ tools -material ${HOME} Contents of tools -material bin / Some BSC tools scripts to make your life easier apps/ CGPOP mini- application for the hands-on session slides /
E N D
Objectives • Copy ~nct00001/tools-material intoyour ${HOME} • cp –r ~nct00001/tools-material ${HOME} • Contents of tools-material • bin/ • Some BSC tools scripts to makeyourlifeeasier • apps/ • CGPOP mini-applicationforthehands-onsession • slides/ • Alltheslideswrt BSC tools • packages/ • Paraverpackages & tutorials • doc/ • Extrae user guide
Paraver • InstalltheParaverbinaries in your laptop • Binariesforlinuxx86 & x86-64, windows & mac • Configure theParaverpackage • Set-up thetutorialsdirectory • GointoHelp > Tutorials, clickonPreferencesWindow • EditTutorialsroot to thedirectorythatcontainsthetutorial • tools-material/packages/Tutorials
Trace generationworkflow Application Process Application Process Application Process Paraver Dimemas Clustering Folding … MPIT Extrae Extrae MPIT .prv .pcf .row MPIT Extrae lib Analysis Instrumentation
Obtaining traces (CGPOP) • Buildthe CGPOP application • cd ~/tools-material/apps/CGPOP • ./build • Generate trace-file forthe CGPOP application • cd ~/tools-material/apps/CGPOP/jobscript • editjob.lsf • Uncomment module load bsctools & TRACE definition • Optionally, choose a trace-file name • submitthejob • bsub < job.lsf
Insidejob.lsf #!/bin/bash #BSUB -n 48 #BSUB -oocgpop_%J.out #BSUB -eocgpop_%J.err #BSUB -R"span[ptile=16]" #BSUB -x # Exclusive use #BSUB -J cgpop #BSUB -W 00:10 #BSUB -U tools module load netcdf/4.1.3 # To trace, uncommentthetwofollowinglines and addTRACE # in betweenmpirun and thebinary module load bsctools export TRACE=~/tools-material/apps/trace.mpi.f.sh export TRACE_NAME= time mpirun${TRACE} ../mpi2s1D/cgpop.linux_icc.180x120
Inside trace.*.sh Configure instrumentation Executethebinarypassed as a parameter Injectinstrumentationcode #!/bin/bash # Workaroundfor MN3 export TMPDIR=${TMPDIR}/extrae mkdir –p ${TMPDIR} export EXTRAE_CONFIG_FILE=${HOME}/tools-material/extrae/extrae.xml export LD_PRELOAD=${EXTRAE_HOME}/lib/libmpitrace.so $@
Library alternatives 1 for Fortran codes
Extrae XML configuration <counters enabled="yes"> <cpu enabled="yes" starting-set-distribution="1"> <set enabled="yes" domain="all" changeat-time="100000us“> PAPI_TOT_INS,PAPI_TOT_CYC,PAPI_L1_DCM,PAPI_L2_DCM,PAPI_L3_TCM,PAPI_FP_INS,PAPI_BR_MSP </set> <set enabled="yes" domain="all" changeat-time="100000us"> PAPI_TOT_INS,PAPI_TOT_CYC,PAPI_LD_INS,PAPI_SR_INS,RESOURCE_STALLS,PAPI_BR_UCN,PAPI_BR_CN,PAPI_VEC_SP </set> <set enabled="yes" domain="all" changeat-time="100000us"> PAPI_TOT_INS,PAPI_TOT_CYC,RESOURCE_STALLS:LB,RESOURCE_STALLS:RS,RESOURCE_STALLS:SB,RESOURCE_STALLS:ROB,PAPI_VEC_DP </set> </cpu> <network enabled="no" /> <resource-usage enabled="no" /> <memory-usage enabled="no" /> </counters> GUIA DE USUARIO explained.xml
Extrae XML configuration <buffer enabled="yes"> <size enabled="yes">500000</size> <circular enabled="no" /> </buffer> <sampling enabled="no" type="default" period="50m" variability="10m" /> <merge enabled="yes" synchronization="default" tree-fan-out="16" max-memory="512" joint-states="yes" keep-mpits="yes" sort-addresses="yes" overwrite="yes" > $TRACE_NAME$ </merge>
Extrae XML configuration <mpi enabled="yes"> <counters enabled="yes" /> </mpi> <openmp enabled="yes"> <locks enabled="no" /> <counters enabled="yes" /> </openmp> <pthread enabled="no"> <locks enabled="no" /> <counters enabled="yes" /> </pthread> <callers enabled="yes"> <mpi enabled="yes">1-3</mpi> <sampling enabled="no">1-5</sampling> </callers>
Using Paraver • AnalysetheresultswithParaver • Tutorialsavailable • Tutorial 1: Introductory tutorial ontheusage of theParaver GUI • Tutorial 2: Analysis of HydroCapplication • Tutorial 3: Introductory tutorial ontheusage of Dimemas • Tutorial 4: General Paraver & Dimemasanalysisapplied to WRF • Tutorial 5: General Paraver & Dimemasanalysismethodology • REMEMBER! Configuration files (*.cfg) can be applied to any trace-file.