For best VIM settings (in your ~/.vimrc
):
filetype plugin indent on
syntax on
set number
set tabstop =4
set softtabstop =4
set shiftwidth =4
set expandtab
For best VIM settings (in your ~/.vimrc
):
filetype plugin indent on
syntax on
set number
set tabstop =4
set softtabstop =4
set shiftwidth =4
set expandtab
#!/bin/bash | |
# This has to be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin | |
# Remove local fully merged branches | |
git branch --merged master | grep -v 'master$' | grep -v 'dev$' | xargs git branch -d |
This is another example which we show how we can wrap a function in C to gain more performance. We use the integral of
This is the C code:
/*
Code to compute the number Pi = 3.14
Integral 4/(1+x^2) from 0 to 1 is 3.14
Main Reference: https://docs.nersc.gov/jobs/examples/#job-arrays
"Job arrays provides a mechanism for submitting and managing collections of similar jobs quickly and easily." You will create a single script (e.g., job.sbatch
) which uses the variable SLURM_ARRAY_TASK_ID to point at the correct files:
#!/bin/bash
#SBATCH -q debug
#SBATCH -o job_array_test%j.out
#SBATCH -n 1
#SBATCH --time 00:02:00
#SBATCH -C haswell