Changes in README [24aa734:3c9fc94]
Legend:
- Unmodified
- Added
- Removed
-
README
r24aa734 r3c9fc94 16 16 -L/path/to/memlog -Wl,-rpath,/path/to/memlog -lmemlog 17 17 18 For statically-linked applications, add the following to your linker flags: 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. 19 21 20 -Wl,--wrap,malloc,--wrap,free,--wrap,realloc,--wrap,calloc,--wrap,memalign \ 21 /path/to/memlog/memlog_s.o -lpthread -ldl 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 22 34 23 35 ** RUNNING ** … … 29 41 use by running: 30 42 31 /path/to/memlog/memlog 2dot/path/to/HOST.PID.memlog43 /path/to/memlog/memlog_analyze /path/to/HOST.PID.memlog 32 44 33 45 this will generate files named HOST.PID.memlog.dot, HOST.PID.memlog.ps and … … 36 48 in textual form. 37 49 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 38 66 Note that te peak memory usage is determined by monitoring the processes's 39 67 maximum resident set size, not just the total allocated heap memory. 40 68 41 memlog2dot depends on dot (from the graphviz package) and ps2pdf (from the 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 42 74 ghostscript package), plus various tools from the binutils package. 43 75
Note: See TracChangeset
for help on using the changeset viewer.