printf("(%d) (in mass) N_stars=%d N_gas=%d i=%d id=%d P[i].StPIdx=%d StP[P[i].StPIdx].PIdx=%d StP[P[i].StPIdx].ID=%d\n\n",ThisTask,N_stars,N_gas,i,P[i].ID,P[i].StPIdx,StP[P[i].StPIdx].PIdx,StP[P[i].StPIdx].ID);
endrun(1212001);
}
if(StP[P[i].StPIdx].PIdx!=i)
{
printf("\nP/StP correspondance error\n");
printf("(%d) (in gas accretion) N_stars=%d N_gas=%d i=%d id=%d P[i].StPIdx=%d StP[P[i].StPIdx].PIdx=%d\n\n",ThisTask,N_stars,N_gas,i,P[i].ID,P[i].StPIdx,StP[P[i].StPIdx].PIdx);
endrun(1212001);
}
if(StP[P[i].StPIdx].ID!=P[i].ID)
{
printf("\nP/StP correspondance error\n");
printf("(%d) (in gas accretion) N_gas=%d N_stars=%d i=%d Type=%d P.Id=%d P[i].StPIdx=%d StP[P[i].StPIdx].ID=%d \n\n",ThisTask,N_gas,N_stars,i,P[i].Type,P[i].ID,P[i].StPIdx,StP[P[i].StPIdx].ID);
endrun(1212002);
}
}
if(ThisTask==0)
printf("Check id correspondence after mass order...\n");