Is this possible to read the out and error file before the job is finished?

No. However, you can redirect the stdout and stderr of your program to a file and read that. Make sure that there is not a lot of output, otherwise it will slow your program down. These examples will be part of your moab submission script.

Method 1. Redirect all output and error to the file output-$PBS_JOBID.txt. $PBS_JOBID will be filled in with the id of your job. The moab output file will be empty with this construction.

cd $PBS_O_WORKDIR
mpirun ./myprog arg1 > output-$PBS_JOBID.txt 2>&1

Method 2. With the tee command we can write output and error to a file and print it to the stdout. In this case the moab output file will contain the same information as your output file.

cd $PBS_O_WORKDIR
mpirun ./myprog arg1 2>&1 | tee output-$PBS_JOBID.txt