// thread 0 already wrote on global files, skip it and take care of appending the others
// thread 0 already wrote on global files, skip it and take care of appending the others
for(intri=1;ri<ompnumthreads;ri++){
for(intri=1;ri<ompnumthreads;ri++){
// Giovanni, please add here in this loop code to reopen the temporary files, reread them and append them respectively to the global output and tppoan, before closing them
// reopen local files, send them all to MPI process 0
// reopen local files, send them all to MPI process 0
for(intri=0;ri<ompnumthreads;ri++){
for(intri=0;ri<ompnumthreads;ri++){
// Giovanni, please add here in this loop code to reopen the temporary files, reread them and append them respectively to the global output and tppoan, before closing them