I am batch processing in C++ and want to know whether it is possible to define a .cpp
file name in the PBS script file (see below). For example, for one of my .cpp
files I have two versions: a parallel OpenMP version (func_parallel.cpp
) and a serial version (func_serial.cpp
). I would like to be able to have two script files (both resembling the file below): one that specifies that I would like to use func_parallel.cpp
and the other that specifies that I would like to use func_serial.cpp
, without having to manually do this in the code.
Is this possible?
Script file:
#!/bin/bash
#PBS -S /bin/bash
#PBS -l walltime=00:10:00
#PBS -l select=1:ncpus=4:mem=2gb
#PBS -q QName
#PBS -N Name
#PBS -o Results/output.txt
#PBS -e Results/error.txt
#PBS -m abe -M email@address
module purge
module load intel-compiler/11.1.073
export OMP_NUM_THREADS=4
cd $WORKDIR
./myprog