omp critical in out->trainbatch