Changeset 2d9e75d for README


Ignore:
Timestamp:
07/22/15 14:18:06 (9 years ago)
Author:
Hal Finkel <hfinkel@…>
Branches:
master
Children:
96927c5
Parents:
09f3093 (diff), 3c9fc94 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Hal Finkel <hfinkel@…> (07/22/15 14:18:06)
git-committer:
Hal Finkel <hfinkel@…> (07/22/15 14:18:06)
Message:

Merge branch 'master' of git.mcs.anl.gov:memlog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • README

    r24aa734 r3c9fc94  
    1616      -L/path/to/memlog -Wl,-rpath,/path/to/memlog -lmemlog 
    1717 
    18 For statically-linked applications, add the following to your linker flags: 
     18For statically-linked applications ld's automatic wrapping functionality is 
     19employed, and the exact set of necessary flags is large, so a file named 
     20memlog_s_ld_cmds has been provided containing the necessary flags. 
    1921 
    20   -Wl,--wrap,malloc,--wrap,free,--wrap,realloc,--wrap,calloc,--wrap,memalign \ 
    21     /path/to/memlog/memlog_s.o -lpthread -ldl 
     22To your linker flags add: 
     23 
     24  `cat /path/to/memlog/memlog_s_ld_cmds` 
     25 
     26or, if your compiler and wrappers support response files (gcc and clang do, for 
     27example), simply: 
     28 
     29  @/path/to/memlog/memlog_s_ld_cmds 
     30 
     31so your overall linking command might look something like this: 
     32 
     33  mpic++ -O3 -g -o my_program my_obj1.o my_obj2.o @/path/to/memlog/memlog_s_ld_cmds 
    2234 
    2335** RUNNING ** 
     
    2941use by running: 
    3042 
    31   /path/to/memlog/memlog2dot /path/to/HOST.PID.memlog 
     43  /path/to/memlog/memlog_analyze /path/to/HOST.PID.memlog 
    3244 
    3345this will generate files named HOST.PID.memlog.dot, HOST.PID.memlog.ps and 
     
    3648in textual form. 
    3749 
     50If you pass the --leaks option to memlog_analyze, it will provide data on 
     51allocations active at the end of the program (leaks) instead of those active 
     52when the peak memory usage is first reached. 
     53 
     54You might have many runs of the same application (or output from many ranks of 
     55an MPI job), and you'd like to pick the one for analysis with the highest 
     56memory usage. If you provide a glob pattern to memlog_analyze it will do this 
     57for you. Make sure you quote the glob pattern so that your shell does not 
     58expand it. 
     59 
     60  /path/to/memlog/memlog_analyze "/path/to/*.memlog" 
     61 
     62When running under common batch systems, the files are named 
     63JOB_ID.HOST.PID.memlog, and when running under the BG/Q CNK, the process's rank 
     64is used instead of the node-local PID. 
     65 
    3866Note that te peak memory usage is determined by monitoring the processes's 
    3967maximum resident set size, not just the total allocated heap memory. 
    4068 
    41 memlog2dot depends on dot (from the graphviz package) and ps2pdf (from the 
     69memlog_analyze takes, as a second optional parameter, the name of the output 
     70directory (the current directory is the default). If the directory does not 
     71exist, it will be created. 
     72 
     73memlog_analyze depends on dot (from the graphviz package) and ps2pdf (from the 
    4274ghostscript package), plus various tools from the binutils package. 
    4375 
Note: See TracChangeset for help on using the changeset viewer.