GNU Parallel#
Tool for executing jobs in parallel on one or more computer
Jobs can be single commands, scripts or parallelized jobs themselves
Helpful for running repetitive tasks or utilizing computing resources better
Running Parallel on HPCs#
Most clusters should have one installed, check with
module av
ormodule spider parallel
, if available thenmodule load
You can also install your own. Here is an example, installed into
~/Programs
Vist the GNU website https://www.gnu.org/software/parallel/
Find the download links HTTPS, HTTP, FTP
Right-click and copy the link
In Terminal, login to the cluster and navigate to
cd ~/.Programs
Copy the link here with
wget WWW....
Decompress the folder with
tar xf parallel-202...
Go to the directory and configure
cd parallel-202...
and configure./configure --prefix=~/Programs && make && make install
Parallel Umbrella Sampling Windows for MD Simulations#
#!/bin/bash
#SBATCH -p long
#SBATCH -t 5-00:00:00
#SBATCH -n 1
#SBATCH --ntasks-per-node=32
#SBATCH --output=%j.out
#SBATCH --error=%j.err
#SBATCH --job-name=${name}${job}
date
module load parallel
w_i=0 # First window
w_f=42 # last window
jobs=8 # number of cores for each simulation
parallel --jobs ${JOBS} bash runmd.sh {} ::: $(seq -f"%02g" w_i w_f)
date