Race conditions - program tries to continue before threading has completed

Hello,
I am trying to run I-TASSER 5.0 on an SGE cluster. I had to first make some changes to the qsub commands in the I-TASSERmod/run*.pl scripts in order for it to work, but there seems to be a race condition.

On the first run using the example dataset you provide, I get:

~~~
2.4.1 Use all templates
submit threading jobs first and run pair during threading
3.1 do threading
start parallel threading PPAS
start parallel threading dPPAS
start parallel threading dPPAS2
start parallel threading Env-PPAS
start parallel threading MUSTER
start parallel threading wPPAS
start parallel threading wdPPAS
start parallel threading wMUSTER
running pair now ................
FORTRAN STOP
30000 6379375 total lib str & residues
number of observations 27.03459 1658491.
pair done
only 0 threading programs have output, please check threading programs
cp: cannot stat `model*.pdb': No such file or directory
cp: cannot stat `init.*': No such file or directory
cp: cannot stat `cscore': No such file or directory
cp: cannot stat `lscore.txt': No such file or directory
cp: cannot stat `rst.dat': No such file or directory
cp: cannot stat `rep*tra*.*': No such file or directory
~~~

The simulations tried to run immediately after pairing finished, but the threading jobs were still running (I was monitoring qstat during this process). After the threading jobs finished, I restarted I-TASSER and it was able to continue from where it left off:

~~~
type= easy, n_good=35, M0= 7, M1_for_medm=1.4, n_sg= 7 role=SEQ
domain2=no
type=easy----n_temp_use_for_restraints=20
4.1 run simulation
run 14 parallel simulations
run the first simulation job examplesim_1A
~~~

I know this can be fixed by forcing the script wait for the threading jobs to complete-- I can do this with the -sync option to qsub that SGE provides, forking to background, and using the wait command, but I was wondering whether you have encountered this problem before.

Thanks and regards
Afif