From 2ea6dabd13667027ba02a17b31b40cc5bfefa8c4 Mon Sep 17 00:00:00 2001 From: Michael Greenburg Date: Fri, 1 Mar 2024 15:07:07 -0700 Subject: [PATCH] Added a missing word --- resources.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources.md b/resources.md index 8ef8ad7..a19e7ec 100644 --- a/resources.md +++ b/resources.md @@ -100,7 +100,7 @@ One aspect of C++ that trips up many students is fact that '`&`' is used for so ### Debugging, Profiling, and Optimization -[GDB](https://www.bitdegree.org/learn/gdb-debugger) is ubiquitous for debugging C++ programs; you'll want to `module load gdb` to [get access to a recent version](https://rc.byu.edu/wiki/?id=Environment+Modules) on the supercomputer. If you prefer a graphical debugger, you can [integrate GDB into VS Code](https://youtu.be/G9gnSGKYIg4). If you do so, make sure to set [`miDebuggerPath`](https://youtu.be/G9gnSGKYIg4?t=109) to the path returned by `module load gdb && which gdb`; you'll probably also want to modify `tasks.json` by changing `command` to the result of `module load gcc/latest && which g++` and adding `-std=c++20` to `args`. [Valgrind](https://valgrind.org/docs/manual/quick-start.html) is essential for [tracking down memory problems](https://prajankya.me/valgrind-on-linux/); again, you'll want to `module load valgrind` for a recent version. For MPI applications, I haven't found anything better than using [`tmpi`](https://github.com/Azrael3000/tmpi) with `gdb` (`module load gdb tmux reptyr tmpi`). +[GDB](https://www.bitdegree.org/learn/gdb-debugger) is ubiquitous for debugging C++ programs; you'll want to `module load gdb` to [get access to a recent version](https://rc.byu.edu/wiki/?id=Environment+Modules) on the supercomputer. If you prefer a graphical debugger, you can [integrate GDB into VS Code](https://youtu.be/G9gnSGKYIg4). If you do so, make sure to set [`miDebuggerPath`](https://youtu.be/G9gnSGKYIg4?t=109) to the path returned by `module load gdb && which gdb`; you'll probably also want to modify `tasks.json` by changing `command` to the result of `module load gcc/latest && which g++` and adding `-std=c++20` to `args`. [Valgrind](https://valgrind.org/docs/manual/quick-start.html) is essential for [tracking down memory problems](https://prajankya.me/valgrind-on-linux/); again, you'll want to `module load valgrind` for a recent version. For debugging MPI applications, I haven't found anything better than using [`tmpi`](https://github.com/Azrael3000/tmpi) with `gdb` (`module load gdb tmux reptyr tmpi`). There are [many tools available for profiling in C++](https://hackingcpp.com/cpp/tools/profilers.html); [perf](https://dev.to/etcwilde/perf---perfect-profiling-of-cc-on-linux-of) is a good, simple choice in combination with Valgrind. Profiling and [optimization](https://www.agner.org/optimize/optimizing_cpp.pdf) in C++ are hard--this class will be the start of a long journey.