#!/bin/csh # add Sun Studio tools to your path # including cc, collect, analyzer, and er_print set path = ( /opt/SUNWspro/bin $path ) # add Sun HPC ClusterTools to your path (CT8.1 for Sun compilers) # including mpicc and mpirun set path = ( /opt/SUNWhpc/HPC8.1/sun/bin $path ) # compile the program mpicc a.c # run the program # # collect : collect performance data # -M CT8.1 : using an MPI implementation (ClusterTools 8.1) # -H on : turn on heap (memory) allocation tracing # -o test.*.er : direct output (performance data) to this file # mpirun -np 2 : run a 2-process MPI job # -- : indicator for MPI job name # ./a.out : name of executable # 0|2 : command-line argument (how long receiver sleeps) collect -M CT8.1 -H on -o test.0.er mpirun -np 2 -- ./a.out 0 collect -M CT8.1 -H on -o test.2.er mpirun -np 2 -- ./a.out 2 # view the performance data with the GUI-based Analyzer analyzer test.0.er analyzer test.2.er # use the command-line tool to view the performance data # - see a list of available metrics # - see # bytes allocated and # of allocations in caller-callee format er_print -metric_list test.0.er er_print -cmetrics i.balloc:i.alloc -callers-callees test.2.er