-
Notifications
You must be signed in to change notification settings - Fork 82
Useful Tools
Simon Gene Gottlieb edited this page Oct 5, 2023
·
27 revisions
- SSH -- connecting with ssh to the fu-berlin servers
- tmux -- Run Programs on the server without constant connection
- gdb -- gdb to debug your code (sometimes faster than printf)
- fzf π -- quick file/folder selection, improve ctrl-r in shell and much more
- miniconda π -- install software in user space
-
ncdu π -- interactive disk usage; e.g.
ncdu -xr ~
- valgrind π -- tool to detect memory leaks and invalid reads before writes
- callgrind π/kcachegrind π -- runtime profiling and visualization
- perf π/hotspot π -- runtime profiling and visualization
- massif π/massif-visualizer π -- heap memory profiling and visualization
- GraphViz
- cmp benchmarks -- The cmp_benchmarks.sh provides a wrapper around google/benchmark/tools/compare.py. It can be used to compare benchmarks between versions and to filter out significant differences in runtime. -> cmp_benchmarks:-Example-Usage
- Access problems:
chmod a+rwX FILE
(all users -> read(r), write(w) & search of directories (X)) - How much space do I use?
du -sh * | sort -rh
; or usencdu
- How much memory is my program using?
/usr/bin/time -v <your program>
and check the "Maximum resident set size" - Which files are being sourced?
/bin/bash -lixc exit 2>&1 | sed -n 's/^+* \(source\|\.\) //p'
or for the extremistsecho exit | strace bash -li |& grep '^open'
Useful page to interpret bash commands: https://explainshell.com/explain?cmd=du+-sm+*+%7C+sort+-rh
If you prefer to use a Git GUI, we recommend sourcetree π. You can also use a commit message template that looks like this:
~/Repos/seqan3$ less .git/commit_msg_template.txt
[FEATURE] Whenever you implement something new and shiny
[FIX] Whenever you fix some wrong code in the source
[DOC] Whenever you do something only(!) related to the documentation
[INFRA] Whenever you change something of the build system or CI related
[TEST] Whenever you do something related to the tests (unit or benchmark)
[MISC] miscellaneous (=sonstiges) (style guide fixes) - Whenever it does not fit to any of the above
[INTERNAL] [I/O] [WIP] work in progress
([NOP] not otherwise provided)
Example for raptor and gcc-12. The same should work for most other SeqAn3 tools and gcc versions:
git clone https://github.com/seqan/raptor.git --recursive
mkdir raptor/build
cd raptor/build
export CC=/group/ag_abi/software/bin/gcc-12.3
export CXX=/group/ag_abi/software/bin/g++-12.3
cmake ..
make -j8
For one university project we did the following:
cmake .. "-DCMAKE_CXX_FLAGS=-Wl,-rpath -Wl,/import/GCC/12.2.1/lib64" -DCMAKE_CXX_COMPILER=/import/GCC/12.2.1/bin/g++
Run following steps to install gcc and homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# -> Press Ctrl-D for local installation
# -> Hit Enter to continue
$ echo 'eval "$(${HOME}/.linuxbrew/bin/brew shellenv)"' >> ${HOME}/.zprofile
$ eval "$(${HOME}/.linuxbrew/bin/brew shellenv)"
$ brew install gcc
Compiling a tool like raptor
$ export CC=gcc-11
$ export CXX=g++-11
$ git clone https://github.com/seqan/raptor.git --recursive
$ mkdir raptor/build
$ cd raptor/build
$ cmake ..
$ make -j8
sudo apt update
sudo apt install git cmake gcc-10 g++-10 zlib1g-dev libbz2-dev gdb
git clone https://github.com/seqan/raptor.git --recursive
mkdir raptor/build
cd raptor/build
export CC=gcc-10
export CXX=g++-10
cmake .. # or cmake .. -DCMAKE_BUILD_TYPE=Debug # or cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4 raptor
Additional info on how to use WSL with clion: https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-product.html
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh https://code.visualstudio.com/docs/remote/ssh