Commit 43d55ef9 authored by pugmire's avatar pugmire
Browse files

This change allows parallel processing of streamlines on single domain datasets.

The load balancer will replicate datasets across all procs, and the PICS filter will force select the serial streamline algorithm.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11639 18c085ea-50e0-402c-830e-de6fd14e8384
parent cf19ceec
...@@ -389,7 +389,6 @@ avtPICSFilter::GetDomain(const DomainType &domain, ...@@ -389,7 +389,6 @@ avtPICSFilter::GetDomain(const DomainType &domain,
} }
*/ */
ds = dataSets[domain.domain]; ds = dataSets[domain.domain];
} }
if (DebugStream::Level5()) if (DebugStream::Level5())
...@@ -463,7 +462,6 @@ avtPICSFilter::DomainLoaded(DomainType &domain) const ...@@ -463,7 +462,6 @@ avtPICSFilter::DomainLoaded(DomainType &domain) const
#ifdef PARALLEL #ifdef PARALLEL
if (OperatingOnDemand()) if (OperatingOnDemand())
return avtDatasetOnDemandFilter::DomainLoaded(domain.domain, domain.timeStep); return avtDatasetOnDemandFilter::DomainLoaded(domain.domain, domain.timeStep);
return PAR_Rank() == domainToRank[domain.domain]; return PAR_Rank() == domainToRank[domain.domain];
#endif #endif
...@@ -779,12 +777,7 @@ avtPICSFilter::Execute(void) ...@@ -779,12 +777,7 @@ avtPICSFilter::Execute(void)
SetMaxQueueLength(cacheQLen); SetMaxQueueLength(cacheQLen);
#ifdef PARALLEL #ifdef PARALLEL
/* if (method == STREAMLINE_LOAD_ONDEMAND)
if (numDomains == 1)
method = STREAMLINE_STAGED_LOAD_ONDEMAND;
*/
if (method == STREAMLINE_STAGED_LOAD_ONDEMAND)
icAlgo = new avtSerialICAlgorithm(this); icAlgo = new avtSerialICAlgorithm(this);
else if (method == STREAMLINE_PARALLEL_STATIC_DOMAINS) else if (method == STREAMLINE_PARALLEL_STATIC_DOMAINS)
icAlgo = new avtParDomICAlgorithm(this, maxCount); icAlgo = new avtParDomICAlgorithm(this, maxCount);
...@@ -872,12 +865,14 @@ avtPICSFilter::Execute(void) ...@@ -872,12 +865,14 @@ avtPICSFilter::Execute(void)
// Only set seedTime0 to the simulation time for pathlines and not // Only set seedTime0 to the simulation time for pathlines and not
// streamlines. // streamlines.
// //
// Dave Pugmire, Mon Jun 14 14:16:57 EDT 2010
// Allow serial algorithm to be run in parallel on single domain datasets.
//
// **************************************************************************** // ****************************************************************************
void void
avtPICSFilter::Initialize() avtPICSFilter::Initialize()
{ {
//MOVE TO ALGO. InitStatistics();
dataSpatialDimension = GetInput()->GetInfo().GetAttributes().GetSpatialDimension(); dataSpatialDimension = GetInput()->GetInfo().GetAttributes().GetSpatialDimension();
std::string db = GetInput()->GetInfo().GetAttributes().GetFullDBName(); std::string db = GetInput()->GetInfo().GetAttributes().GetFullDBName();
ref_ptr<avtDatabase> dbp = avtCallback::GetDatabase(db, 0, NULL); ref_ptr<avtDatabase> dbp = avtCallback::GetDatabase(db, 0, NULL);
...@@ -887,10 +882,10 @@ avtPICSFilter::Initialize() ...@@ -887,10 +882,10 @@ avtPICSFilter::Initialize()
if (doPathlines) if (doPathlines)
{ {
if (md->AreAllTimesAccurateAndValid() != true) if (md->AreAllTimesAccurateAndValid() != true)
{ {
avtCallback::IssueWarning("Pathlines - The time data does not appear to be accurate and valid. Will continue."); avtCallback::IssueWarning("Pathlines - The time data does not appear to be accurate and valid. Will continue.");
} }
} }
// Get/Compute the interval tree. // Get/Compute the interval tree.
...@@ -950,7 +945,6 @@ avtPICSFilter::Initialize() ...@@ -950,7 +945,6 @@ avtPICSFilter::Initialize()
#ifdef PARALLEL #ifdef PARALLEL
int rank = PAR_Rank(); int rank = PAR_Rank();
int nProcs = PAR_Size(); int nProcs = PAR_Size();
//MOVE TO ALGO statusMsgSz = numDomains+2;
#endif #endif
// Assign domains to processors, if needed. // Assign domains to processors, if needed.
...@@ -982,12 +976,17 @@ avtPICSFilter::Initialize() ...@@ -982,12 +976,17 @@ avtPICSFilter::Initialize()
// Set and communicate all the domains. // Set and communicate all the domains.
#ifdef PARALLEL #ifdef PARALLEL
vector<int> myDoms; if (numDomains > 1)
myDoms.resize(numDomains, 0); {
for (int i = 0; i < ds_list.domains.size(); i++) vector<int> myDoms;
myDoms[ ds_list.domains[i] ] = rank; myDoms.resize(numDomains, 0);
SumIntArrayAcrossAllProcessors(&myDoms[0],&domainToRank[0],numDomains); for (int i = 0; i < ds_list.domains.size(); i++)
debug5<<"numdomains= "<<numDomains<<" myDoms[0]= "<<myDoms[0]<<endl; myDoms[ ds_list.domains[i] ] = rank;
SumIntArrayAcrossAllProcessors(&myDoms[0],&domainToRank[0],numDomains);
debug5<<"numdomains= "<<numDomains<<" myDoms[0]= "<<myDoms[0]<<endl;
}
else
domainToRank[0] = rank;
#endif #endif
for (int i = 0; i < ds_list.domains.size(); i++) for (int i = 0; i < ds_list.domains.size(); i++)
{ {
...@@ -1002,9 +1001,13 @@ avtPICSFilter::Initialize() ...@@ -1002,9 +1001,13 @@ avtPICSFilter::Initialize()
// If not operating on demand, the method *has* to be parallel static domains. // If not operating on demand, the method *has* to be parallel static domains.
if ( ! OperatingOnDemand() ) if ( ! OperatingOnDemand() )
method = STREAMLINE_PARALLEL_STATIC_DOMAINS; method = STREAMLINE_PARALLEL_STATIC_DOMAINS;
// Parallel and one domains, use the serial algorithm.
if (numDomains == 1)
method = STREAMLINE_LOAD_ONDEMAND;
#else #else
// for serial, it's all load on demand. // for serial, it's all load on demand.
method = STREAMLINE_STAGED_LOAD_ONDEMAND; method = STREAMLINE_LOAD_ONDEMAND;
#endif #endif
if (DebugStream::Level5()) if (DebugStream::Level5())
...@@ -1030,7 +1033,7 @@ avtPICSFilter::Initialize() ...@@ -1030,7 +1033,7 @@ avtPICSFilter::Initialize()
if (intv[0] >= intv[1]) if (intv[0] >= intv[1])
{ {
avtCallback::IssueWarning("Pathlines - Found two adjacent steps that are not inceasing or equal in time. Setting the time difference to 1. This change will most likely affect the results."); avtCallback::IssueWarning("Pathlines - Found two adjacent steps that are not inceasing or equal in time. Setting the time difference to 1. This change will most likely affect the results.");
intv[0] = (double)i; intv[0] = (double)i;
intv[1] = (double)i+1; intv[1] = (double)i+1;
...@@ -2057,6 +2060,11 @@ avtPICSFilter::CreateIntegralCurvesFromSeeds(std::vector<avtVector> &pts, ...@@ -2057,6 +2060,11 @@ avtPICSFilter::CreateIntegralCurvesFromSeeds(std::vector<avtVector> &pts,
// Programmer: Hank Childs // Programmer: Hank Childs
// Creation: June 5, 2010 // Creation: June 5, 2010
// //
// Modifications:
//
// Dave Pugmire, Mon Jun 14 14:16:57 EDT 2010
// Allow serial algorithm to be run in parallel on single domain datasets.
//
// **************************************************************************** // ****************************************************************************
avtContract_p avtContract_p
...@@ -2131,7 +2139,7 @@ avtPICSFilter::ModifyContract(avtContract_p in_contract) ...@@ -2131,7 +2139,7 @@ avtPICSFilter::ModifyContract(avtContract_p in_contract)
out_contract->GetDataRequest()->SetDesiredGhostDataType(GHOST_ZONE_DATA); out_contract->GetDataRequest()->SetDesiredGhostDataType(GHOST_ZONE_DATA);
#ifdef PARALLEL #ifdef PARALLEL
//out_contract->SetReplicateSingleDomainOnAllProcessors(true); out_contract->SetReplicateSingleDomainOnAllProcessors(true);
#endif #endif
if (doPathlines) if (doPathlines)
......
...@@ -69,7 +69,7 @@ class avtICAlgorithm; ...@@ -69,7 +69,7 @@ class avtICAlgorithm;
#define STREAMLINE_INTEGRATE_ADAMS_BASHFORTH 1 #define STREAMLINE_INTEGRATE_ADAMS_BASHFORTH 1
#define STREAMLINE_INTEGRATE_M3D_C1_INTEGRATOR 2 #define STREAMLINE_INTEGRATE_M3D_C1_INTEGRATOR 2
#define STREAMLINE_STAGED_LOAD_ONDEMAND 0 #define STREAMLINE_LOAD_ONDEMAND 0
#define STREAMLINE_PARALLEL_STATIC_DOMAINS 1 #define STREAMLINE_PARALLEL_STATIC_DOMAINS 1
#define STREAMLINE_MASTER_SLAVE 2 #define STREAMLINE_MASTER_SLAVE 2
......
...@@ -526,6 +526,9 @@ LoadBalancer::DetermineAppropriateScheme(avtContract_p input) ...@@ -526,6 +526,9 @@ LoadBalancer::DetermineAppropriateScheme(avtContract_p input)
// Dave Pugmire, Tue May 25 10:15:35 EDT 2010 // Dave Pugmire, Tue May 25 10:15:35 EDT 2010
// Add domain single domain replication to all processors. // Add domain single domain replication to all processors.
// //
// Dave Pugmire, Mon Jun 14 14:16:57 EDT 2010
// Single domain replication needs to mark pipeline update complete.
//
// **************************************************************************** // ****************************************************************************
avtDataRequest_p avtDataRequest_p
...@@ -654,7 +657,11 @@ LoadBalancer::Reduce(avtContract_p input) ...@@ -654,7 +657,11 @@ LoadBalancer::Reduce(avtContract_p input)
trav.GetDomainList(list); trav.GetDomainList(list);
if (input->ReplicateSingleDomainOnAllProcessors() && list.size() == 1) if (input->ReplicateSingleDomainOnAllProcessors() && list.size() == 1)
{
silr->RestrictDomainsForLoadBalance(list);
pipelineInfo[input->GetPipelineIndex()].complete = true;
return data; return data;
}
// //
// For variables (including meshes) that require specific types of // For variables (including meshes) that require specific types of
......
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