Debugged the function of parallel inference.
Added a flag option of do_write_parallel_out.