#include #include int attr; int flg; int PetscCommDuplicate(MPI_Comm comm) { void *pointer; MPI_Attr_get(comm,attr,&pointer,&flg); if (!flg) abort(); return 0; } int main(int argc,char **args) { int n = 1000000,i,k,kn = 1000; double *array; MPI_Comm comm; void *pointer; int a; MPI_Init(&argc,&args); MPI_Comm_dup(MPI_COMM_WORLD,&comm); MPI_Keyval_create(MPI_NULL_COPY_FN,MPI_NULL_DELETE_FN,&attr,(void*)0); array = (double*) malloc(n*sizeof(double)); for (i=0; i