Commit 65c08168 authored by Kirill Terekhov's avatar Kirill Terekhov

Possible fix for threephase crash

PrepareReceiveInner was not called for sparse tag
parent 2f8bd434
......@@ -2683,12 +2683,16 @@ namespace INMOST
bool unknown_size = false;
for(unsigned int k = 0; k < tags.size(); k++)
{
if( tags[k].GetSize() == ENUMUNDEF
#if defined(USE_AUTODIFF)
|| tags[k].GetDataType() == DATA_VARIABLE
#endif
) unknown_size = true;
for(int i = 0; i < 5; ++i)
if( (mask & ElementTypeFromDim(i)) && tags[k].isSparseByDim(i) )
unknown_size = true;
}
int rank = GetProcessorRank();
//precompute sizes
for(p = procs.begin(); p != procs.end(); p++ )
......@@ -2698,13 +2702,13 @@ namespace INMOST
{
find = from.find(*p);
if( find != from.end() )
for(int i = 0; i < 4; i++) if( mask & ElementTypeFromDim(i) )
for(int i = 0; i < 5; i++) if( mask & ElementTypeFromDim(i) )
for(element_set::const_iterator it = find->second[i].begin(); it != find->second[i].end(); ++it)
if( GetMarker(*it,select) ) send_size[pos]++;
find = to.find(*p);
if( find != to.end() )
for(int i = 0; i < 4; i++) if( mask & ElementTypeFromDim(i) )
for(int i = 0; i < 5; i++) if( mask & ElementTypeFromDim(i) )
for(element_set::const_iterator it = find->second[i].begin(); it != find->second[i].end(); ++it)
if( GetMarker(*it,select) ) recv_size[pos]++;
}
......@@ -2795,7 +2799,10 @@ namespace INMOST
for(unsigned int k = 0; k < tags.size(); k++)
{
int temp;
MPI_Pack_size(3+n*2,INMOST_MPI_DATA_ENUM_TYPE,comm,&temp); buffer_size += temp;
MPI_Pack_size(2,INMOST_MPI_DATA_BULK_TYPE,comm,&temp); buffer_size += temp;
MPI_Pack_size(1,INMOST_MPI_DATA_ENUM_TYPE,comm,&temp); buffer_size += temp;
MPI_Pack_size(1,INMOST_MPI_DATA_ENUM_TYPE,comm,&temp); buffer_size += temp;
MPI_Pack_size(n,INMOST_MPI_DATA_ENUM_TYPE,comm,&temp); buffer_size += temp;
MPI_Pack_size(n*tags[k].GetSize(),tags[k].GetBulkDataType(),comm,&temp); buffer_size += temp;
}
storage.recv_buffers[num_recv].second.resize(buffer_size);
......
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