dev:debugging
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev:debugging [2015/12/18 14:36] – [valgrind] vondele | dev:debugging [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 53: | Line 53: | ||
| Run valgrind with | Run valgrind with | ||
| < | < | ||
| - | valgrind --max-stackframe=2100192 | + | valgrind --max-stackframe=2100192 --leak-check=full --track-origins=yes |
| </ | </ | ||
| to get the origin of undefined variables in addition to a leak check report. | to get the origin of undefined variables in addition to a leak check report. | ||
| Line 60: | Line 60: | ||
| ==== understanding memory usage ==== | ==== understanding memory usage ==== | ||
| - | valgrind also comes with the ' | + | valgrind also comes with the ' |
| Rather easy with | Rather easy with | ||
| Line 70: | Line 70: | ||
| The valgrind homepage has [[http:// | The valgrind homepage has [[http:// | ||
| + | |||
| + | ==== valgrind in parallel ==== | ||
| + | |||
| + | valgrind can also be used for debugging parallel code, eg.: | ||
| + | |||
| + | < | ||
| + | mpirun -np 2 -x OMP_NUM_THREADS=2 | ||
| + | </ | ||
| + | |||
| ===== Memory leak checking ===== | ===== Memory leak checking ===== | ||
dev/debugging.1450449404.txt.gz · Last modified: (external edit)
