Skip to content

Instantly share code, notes, and snippets.

@cenit
Created March 30, 2015 14:26
Show Gist options
  • Save cenit/940c32d9a9f733cf7940 to your computer and use it in GitHub Desktop.
Save cenit/940c32d9a9f733cf7940 to your computer and use it in GitHub Desktop.
script to run with OpenMP @ CNAF
#!/bin/bash
NUMERO_TOTALE_CORE_DA_USARE=32
NOME_ESEGUIBILE="./ALaDyn"
stderr_file=stderr.txt
stdout_file=stdout.txt
job=job_test_openmp.cmd
job_name=omp
queue=hpc_inf
###########################
rm -f $job
touch $job
chmod 755 $job
touch ${stderr_file}
touch ${stdout_file}
echo "#!/bin/sh" > $job # Job name
echo "#BSUB -J ${job_name}" >> $job # Job name
echo "#BSUB -o %J.out" >> $job # Job standard output
echo "#BSUB -e %J.err" >> $job # Job standard error
echo "#BSUB -q ${queue}" >> $job
echo "#BSUB -n ${NUMERO_TOTALE_CORE_DA_USARE}" >> $job
echo "#BSUB -R \"span[ptile=32]\"" >> $job
echo "module load compilers/gcc-4.8.2" >> $job
echo "export OMP_NUM_THREADS=${NUMERO_TOTALE_CORE_DA_USARE}" >> $job
echo "${NOME_ESEGUIBILE} >> ${stdout_file} 2>> ${stderr_file}" >> $job
echo "Lanciare il job con il seguente comando: "
echo "bsub < $job"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment