MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / predict

Method predict

src/Solver/time_stepping/TimeCluster.cpp:691–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689 // Doesn't do anything
690}
691void TimeCluster::predict() {
692 assert(state == ActorState::Corrected);
693 if (m_clusterData->getNumberOfCells() == 0) return;
694
695 bool resetBuffers = true;
696 for (auto& neighbor : neighbors) {
697 if (neighbor.ct.timeStepRate > ct.timeStepRate
698 && ct.stepsSinceLastSync > neighbor.ct.stepsSinceLastSync) {
699 resetBuffers = false;
700 }
701 }
702 if (ct.stepsSinceLastSync == 0) {
703 resetBuffers = true;
704 }
705
706 writeReceivers();
707#ifdef ACL_DEVICE
708 if (executor == Executor::Device) {
709 computeLocalIntegrationDevice(*m_clusterData, resetBuffers);
710 }
711 else {
712 computeLocalIntegration(*m_clusterData, resetBuffers);
713 }
714#else
715 computeLocalIntegration(*m_clusterData, resetBuffers);
716#endif
717 computeSources();
718
719 seissolInstance.flopCounter().incrementNonZeroFlopsLocal(m_flops_nonZero[static_cast<int>(ComputePart::Local)]);
720 seissolInstance.flopCounter().incrementHardwareFlopsLocal(m_flops_hardware[static_cast<int>(ComputePart::Local)]);
721#ifdef ACL_DEVICE
722 if (hasDifferentExecutorNeighbor()) {
723 auto other = executor == Executor::Device ? seissol::initializer::AllocationPlace::Host : seissol::initializer::AllocationPlace::Device;
724 m_clusterData->bucketSynchronizeTo(m_lts->buffersDerivatives, other, streamRuntime.stream());
725 streamRuntime.wait();
726 }
727#endif
728}
729
730void TimeCluster::handleDynamicRupture(initializer::Layer& layerData) {
731#ifdef ACL_DEVICE

Callers

nothing calls this directly

Calls 7

computeLocalIntegrationFunction · 0.85
bucketSynchronizeToMethod · 0.80
streamMethod · 0.80
getNumberOfCellsMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected