MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / SetDynamic

Method SetDynamic

Src/Base/AMReX_NFiles.cpp:70–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69
70void NFilesIter::SetDynamic(int deciderproc)
71{
72 deciderProc = deciderproc;
73 // ---- we have to check currentDeciderIndex here also in case of
74 // ---- different nfiles for plots and checkpoints
75 if(currentDeciderIndex >= availableDeciders.size() || currentDeciderIndex < 0) {
76 currentDeciderIndex = 0;
77 }
78 if( ! availableDeciders.empty()) {
79 if(deciderProc < 0 || deciderProc >= nProcs) {
80 deciderProc = availableDeciders[currentDeciderIndex];
81 }
82 if(NFilesIter::WhichSetPosition(deciderProc, nProcs, nOutFiles, groupSets) == 0) {
83 // ---- the decider cannot have set position zero
84 deciderProc = availableDeciders[currentDeciderIndex];
85 }
86 }
87 currentDeciderIndex += nSets - 1;
88 if(currentDeciderIndex >= availableDeciders.size() || currentDeciderIndex < 0) {
89 currentDeciderIndex = 0;
90 }
91#if 0
92 // The following has no effect because WhichSetPostion is a pure function and
93 // its return type is not used. So not sure why this is here in the first place.
94 if(myProc == deciderProc) {
95 NFilesIter::WhichSetPosition(myProc, nProcs, nOutFiles, groupSets);
96 }
97#endif
98
99 deciderTag = ParallelDescriptor::SeqNum();
100 coordinatorTag = ParallelDescriptor::SeqNum();
101 doneTag = ParallelDescriptor::SeqNum();
102 writeTag = ParallelDescriptor::SeqNum();
103 remainingWriters = nProcs;
104 useStaticSetSelection = false;
105 if(nOutFiles == nProcs) {
106 useStaticSetSelection = true;
107 coordinatorProc = ParallelDescriptor::IOProcessorNumber();
108 } else {
109 fileNumbersWriteOrder.clear();
110 fileNumbersWriteOrder.resize(nOutFiles);
111 }
112}
113
114
115void NFilesIter::SetSparseFPP(const Vector<int> &ranksToWrite)

Callers 15

compute_dSdtMethod · 0.80
compute_dSdtMethod · 0.80
amrex_fi_new_mfiter_rFunction · 0.80
amrex_fi_new_mfiter_iFunction · 0.80
amrex_fi_new_mfiter_rsFunction · 0.80
amrex_fi_new_mfiter_isFunction · 0.80
amrex_fi_new_mfiter_badmFunction · 0.80
addInhomogNeumannFluxMethod · 0.80
setLevelBCMethod · 0.80
applyBCMethod · 0.80

Calls 6

SeqNumFunction · 0.85
IOProcessorNumberFunction · 0.85
sizeMethod · 0.45
emptyMethod · 0.45
clearMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected