Skip to content

Commit 7d93a0f

Browse files
committed
No assert when sending empty mesh[LS]
Reported-by: Lukas Spies <Lukas.Spies@inria.fr>
1 parent 43e4599 commit 7d93a0f

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/mpi/parallelempi.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -966,18 +966,26 @@ long MPIrank::Send (const Fem2D::Mesh3 * a) const {
966966
long MPIrank::Send (const Fem2D::MeshS * a) const {
967967
if(verbosity>100)
968968
cout << " MPI << (meshS *) " << a << endl;
969-
ffassert(a);
970-
SendWMeshd<MeshS> *rwm= new SendWMeshd<MeshS>(this,&a);
971-
if( rwm->DoSR() ) delete rwm;
969+
if(a) {
970+
SendWMeshd<MeshS> *rwm= new SendWMeshd<MeshS>(this,&a);
971+
if( rwm->DoSR() ) delete rwm;
972+
}
973+
else {
974+
WSend((char*)NULL, 0, who, MPI_TAG<Fem2D::MeshS*>::TAG, comm, rq);
975+
}
972976
return MPI_SUCCESS;
973977
}
974978

975979
long MPIrank::Send (const Fem2D::MeshL * a) const {
976980
if(verbosity>100)
977981
cout << " MPI << (meshL *) " << a << endl;
978-
ffassert(a);
979-
SendWMeshd<MeshL> *rwm= new SendWMeshd<MeshL>(this,&a);
980-
if( rwm->DoSR() ) delete rwm;
982+
if (a) {
983+
SendWMeshd<MeshL> *rwm= new SendWMeshd<MeshL>(this,&a);
984+
if( rwm->DoSR() ) delete rwm;
985+
}
986+
else {
987+
WSend((char*)NULL, 0, who, MPI_TAG<Fem2D::MeshL*>::TAG, comm, rq);
988+
}
981989
return MPI_SUCCESS;
982990
}
983991

0 commit comments

Comments
 (0)