avtContract_p avtMissingDataFilter::ModifyContract(avtContract_p c0) { canDoCollectiveCommunication = ! c0->DoingOnDemandStreaming(); // Store the contract. contract = new avtContract(c0); if (generateMode) { // Determine the list of variables that are missing data. stringVector varsMissingData(MissingDataVariables(contract->GetDataRequest(), &metadata)); if(!varsMissingData.empty()) { // Turn on both Nodes and Zones, to prevent another re-execution if // user switches between zone and node pick. contract->GetDataRequest()->TurnZoneNumbersOn(); contract->GetDataRequest()->TurnNodeNumbersOn(); } } // Return a copy of the modified contract. return new avtContract(contract); }
avtDataRequest_p avtOriginatingSource::BalanceLoad(avtContract_p contract) { bool usesAllDomains =contract->GetDataRequest()->GetSIL().UsesAllDomains(); // // If it shouldn't use load balancing, then it has to do with auxiliary // data coming through our meta-data mechanism. Calling InitPipeline // would change the data attributes and it also causes an unnecessary // callback to our progress mechanism. // if (contract->ShouldUseLoadBalancing()) { InitPipeline(contract); } else if (contract->DoingOnDemandStreaming()) { GetOutput()->GetInfo().GetValidity().SetWhetherStreaming(true); } // // Allow the load balancer to split the load across processors. // bool dataReplicationOccurred = false; avtDataRequest_p rv = NULL; if (!UseLoadBalancer()) { debug5 << "This source should not load balance the data." << endl; rv = contract->GetDataRequest(); } else if (! contract->ShouldUseLoadBalancing()) { debug5 << "This pipeline has indicated that no load balancing should " << "be used." << endl; rv = contract->GetDataRequest(); } else if (loadBalanceFunction != NULL) { debug5 << "Using load balancer to reduce data." << endl; rv = loadBalanceFunction(loadBalanceFunctionArgs, contract); dataReplicationOccurred = contract->ReplicateSingleDomainOnAllProcessors(); } else { debug1 << "No load balancer exists to reduce data." << endl; rv = contract->GetDataRequest(); } // // Return the portion for this processor. // rv->SetUsesAllDomains(usesAllDomains); // // Tell the output if we are doing data replication. // if (dataReplicationOccurred) GetOutput()->GetInfo().GetAttributes().SetDataIsReplicatedOnAllProcessors(true); return rv; }