Add future when all and precise ref variables as omp shared