Skip to content

Useful Tools

Simon Gene Gottlieb edited this page Oct 5, 2023 · 27 revisions

Useful bash commands

  • 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 use ncdu
  • 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 extremists echo exit | strace bash -li |& grep '^open'

Useful page to interpret bash commands: https://explainshell.com/explain?cmd=du+-sm+*+%7C+sort+-rh

Git

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)

Using specific compiler on fu-servers:

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++

Using Brew

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

Using WSL with ubuntu 20.04

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

Links for using VScode

https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh https://code.visualstudio.com/docs/remote/ssh

Clone this wiki locally