Commit b90464b0 authored by allens's avatar allens

when data is replicated do collect the seeds

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@28034 18c085ea-50e0-402c-830e-de6fd14e8384
parent 9b67ea81
......@@ -2193,46 +2193,52 @@ avtIntegralCurveFilter::GenerateSeedPointsFromFieldData(std::vector<avtVector> &
needsRecalculation = true;
#ifdef PARALLEL
needsRecalculation = UnifyMaximumValue( (int) needsRecalculation );
bool dataIsReplicated = GetInput()->GetInfo().GetAttributes().
DataIsReplicatedOnAllProcessors();
// Collect all the seed points on the root processor.
double* all_points = 0;
int *point_counts = 0;
CollectDoubleArraysOnRootProc(all_points, point_counts,
&listOfPoints.front(), (int)listOfPoints.size());
int total = 0;
// Get the total number of point coordinates
if(PAR_Rank() == 0)
if( !dataIsReplicated )
{
needsRecalculation = UnifyMaximumValue( (int) needsRecalculation );
// Collect all the seed points on the root processor.
double* all_points = 0;
int *point_counts = 0;
CollectDoubleArraysOnRootProc(all_points, point_counts,
&listOfPoints.front(), (int)listOfPoints.size());
int total = 0;
// Get the total number of point coordinates
if(PAR_Rank() == 0)
{
int par_size = PAR_Size();
for(int i = 0; i < par_size; ++i)
{
total += point_counts[i];
}
}
// Broadcast the total to all processors.
BroadcastInt(total);
// Allocate space for the points on the other processors.
if(PAR_Rank() != 0)
all_points = new double[total];
// Broadcast the point coordinates to all processors.
BroadcastDoubleArray(all_points, total);
// Stuff the coordinates into the listOFPoints on all processors.
listOfPoints.resize( total );
}
for( int i=0; i<total; ++i )
listOfPoints[i] = all_points[i];
// Broadcast the total to all processors.
BroadcastInt(total);
// Allocate space for the points on the other processors.
if(PAR_Rank() != 0)
all_points = new double[total];
// Broadcast the point coordinates to all processors.
BroadcastDoubleArray(all_points, total);
// Stuff the coordinates into the listOFPoints on all processors.
listOfPoints.resize( total );
if (all_points) delete [] all_points;
if (point_counts) delete [] point_counts;
for( int i=0; i<total; ++i )
listOfPoints[i] = all_points[i];
if (all_points) delete [] all_points;
if (point_counts) delete [] point_counts;
}
#endif
// Generate the points as seeds.
......
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