Commit 2a08582c authored by Vivien Raymond's avatar Vivien Raymond
Browse files

LALInferenceMCMC temporary fix for stuck thread in end of run.

Original: 22f313dec2a9688fb1f1170a50a3f39915a24044
parent 859e1b75
......@@ -1071,10 +1071,11 @@ void LALInferenceFlushPTswap() {
if (MPIrank==0) {
return;
} else {
MPI_Send(&swapRejection, 1, MPI_INT, MPIrank-1, PT_COM, MPI_COMM_WORLD);
MPI_Iprobe(MPIrank-1, PT_COM, MPI_COMM_WORLD, &attemptingSwap, &MPIstatus);
if (attemptingSwap) {
MPI_Recv(&dummyLikelihood, 1, MPI_DOUBLE, MPIrank-1, PT_COM, MPI_COMM_WORLD, &MPIstatus);
MPI_Send(&swapRejection, 1, MPI_INT, MPIrank-1, PT_COM, MPI_COMM_WORLD);
//MPI_Send(&swapRejection, 1, MPI_INT, MPIrank-1, PT_COM, MPI_COMM_WORLD);
}
}
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment