MPI: fix in handling SplitN_? equal 1 or smaller
parent
28c5b496ed
commit
75fb5a0cc9
|
@ -136,8 +136,9 @@ bool openEMS_FDTD_MPI::SetupMPI(TiXmlElement* FDTD_Opts)
|
||||||
int SplitN=0;
|
int SplitN=0;
|
||||||
if (MPI_Elem->QueryIntAttribute( arg_N_Names[n].c_str(), &SplitN) == TIXML_SUCCESS)
|
if (MPI_Elem->QueryIntAttribute( arg_N_Names[n].c_str(), &SplitN) == TIXML_SUCCESS)
|
||||||
{
|
{
|
||||||
if (SplitN<=1)
|
if (SplitN>1)
|
||||||
break;
|
{
|
||||||
|
|
||||||
vector<unsigned int> jobs = AssignJobs2Threads(m_Original_Grid->GetQtyLines(n)-1, SplitN, true);
|
vector<unsigned int> jobs = AssignJobs2Threads(m_Original_Grid->GetQtyLines(n)-1, SplitN, true);
|
||||||
unsigned int line=0;
|
unsigned int line=0;
|
||||||
for (size_t i = 0; i<jobs.size()-1;++i)
|
for (size_t i = 0; i<jobs.size()-1;++i)
|
||||||
|
@ -147,6 +148,7 @@ bool openEMS_FDTD_MPI::SetupMPI(TiXmlElement* FDTD_Opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SplitNumber[n].push_back(m_Original_Grid->GetQtyLines(n)-1);
|
SplitNumber[n].push_back(m_Original_Grid->GetQtyLines(n)-1);
|
||||||
unique(SplitNumber[n].begin(), SplitNumber[n].end());
|
unique(SplitNumber[n].begin(), SplitNumber[n].end());
|
||||||
|
|
Loading…
Reference in New Issue