run script

#!/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
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact