fix parallel programming bug in interlayer pair styles

This commit is contained in:
Axel Kohlmeyer
2021-08-24 10:28:57 -04:00
parent 3bce886ab7
commit 1c7cc42846
2 changed files with 17 additions and 18 deletions

View File

@ -339,7 +339,7 @@ void PairKolmogorovCrespiZ::read_file(char *filename)
nparams++;
if (nparams >= pow(atom->ntypes, 3)) break;
}
}
MPI_Bcast(&nparams, 1, MPI_INT, 0, world);
MPI_Bcast(&maxparam, 1, MPI_INT, 0, world);
@ -348,7 +348,6 @@ void PairKolmogorovCrespiZ::read_file(char *filename)
}
MPI_Bcast(params, maxparam * sizeof(Param), MPI_BYTE, 0, world);
}
memory->destroy(elem2param);
memory->create(elem2param, nelements, nelements, "pair:elem2param");

View File

@ -336,6 +336,7 @@ void PairLebedevaZ::read_file(char *filename)
nparams++;
if (nparams >= pow(atom->ntypes,3)) break;
}
}
MPI_Bcast(&nparams, 1, MPI_INT, 0, world);
MPI_Bcast(&maxparam, 1, MPI_INT, 0, world);
@ -345,7 +346,6 @@ void PairLebedevaZ::read_file(char *filename)
}
MPI_Bcast(params, maxparam*sizeof(Param), MPI_BYTE, 0, world);
}
memory->destroy(elem2param);
memory->create(elem2param,nelements,nelements,"pair:elem2param");