Skip to content

Instantly share code, notes, and snippets.

@wtbarnes
Created August 27, 2015 18:29
Show Gist options
  • Save wtbarnes/a001234f25b15e295ea3 to your computer and use it in GitHub Desktop.
Save wtbarnes/a001234f25b15e295ea3 to your computer and use it in GitHub Desktop.
PBS script for creating job arrays for EBTEL runs
#!/bin/bash
### QSUB Parameters (6678 for pl runs)
#PBS -q batch
#PBS -t 0-6678
#PBS -j oe
#PBS -N emc_ion_a2.5_L20.0
### EBTEL Configuration options
alpha=2.5
loopLength=20.0
species=ion
tpulse=100.0
solver=euler
### Setup path to script and root config paths
script="/home/wtb2/Documents/EBTEL-2fluid_repo/bin/ebtel-2fl quiet "
s1="/data/datadrive2/EBTEL-2fluid_runs/${species}_heating_runs/alpha${alpha}/config/"
s2="ebtel_L${loopLength}_tn"
s3="_tpulse${tpulse}_${solver}"
###Load file with all possible configurations
job_array=(`cat $s1"ebtel_L${loopLength}"$s3"_job_array.conf"`)
### Submit job
cd $PBS_O_WORKDIR
$script$s1$s2${job_array[$((2*$PBS_ARRAYID))]}$s3"/"$s2${job_array[$((2*$PBS_ARRAYID))]}$s3"_"${job_array[$((2*$PBS_ARRAYID+1))]}".xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment