#!/bin/bash
# this script is used to generate jobs for different number of cores in a single
# node, on supermuc


input=single_node.template
output=single_node.job
np_start=6
np_end=8

# replace the word nCores by np in input file
for (( np = np_start; np <= np_end; np++ ))
do
  total=$(expr ${np} \* 2)
  sed "s/nCores/${total}/g" <${input} >${output}
  llsubmit ${output}
# cat ${output}
done

# check my jobs
llq -u $USER
