Skip to content

Instantly share code, notes, and snippets.

@e5k
Last active October 26, 2021 08:14
Show Gist options
  • Save e5k/f61c102dd041b04e6bb1212aab3ffd59 to your computer and use it in GitHub Desktop.
Save e5k/f61c102dd041b04e6bb1212aab3ffd59 to your computer and use it in GitHub Desktop.
Gekko / Unix

Files and folder management

Size of a folder

du -sh folder

Find text in files

grep "Dio" . -R

Count the number of files recursively

find runs/ -type f -name '*_VEI4_*.tif' | wc -l

Cluster

Delete all jobs from a given user

qselect -u sbiasse | xargs qdel

Setting up GPU on Gekko

Setup

  • qsub interactive mode
qsub -q gpu8 -P eos_susanna.jenkins -l select=1:ngpus=1 -I
  • Check if GPU access
nvidia-smi
  • Load conda
module load anaconda2020/python3
eval "$(/usr/local/anaconda3-2020/bin/conda shell.bash hook)"
conda activate ML

Check usage

ssh hostname
top
nvidia-smi

Bashrc

alias get1gpu='qsub -q gpu8 -P eos_susanna.jenkins -l select=1:ngpus=1 -I'

Find host

qstat -f 655465 | grep hpc-

The parameters in detail:

-h: human readable numbers -v: verbose -r: recurse into directories -P: --partial (keep partially transferred files) + --progress (show progress during transfer) -t: preserve modification times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment