Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • README

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