Notice ​the line ''​cd "​$PBS_O_WORKDIR"​'' ​this is saying ​we want to start running ​the job from the current ​directory.

+

In the ''​PBS'' ​script first we copy our input file to the directory ​we will be working in ''/​scratch/​$PBS_JOBID''​. Then we go into that directory to run the computation and send the output to ''​$HOME/​testing/​output''​