// for threads other than the 0, create distinct copies of all relevant data, while for thread 0 just define new references / pointers to the original ones
if(myompthread==0){
cid_2=cid;
// Thread 0 of non-zero MPI processes needs to allocate memory for the