MPI: fix in handling SplitN_? equal 1 or smaller

pull/1/head
Thorsten Liebig 2011-03-08 11:39:02 +01:00
parent 28c5b496ed
commit 75fb5a0cc9
1 changed files with 9 additions and 7 deletions

View File

@ -136,8 +136,9 @@ bool openEMS_FDTD_MPI::SetupMPI(TiXmlElement* FDTD_Opts)
int SplitN=0;
if (MPI_Elem->QueryIntAttribute( arg_N_Names[n].c_str(), &SplitN) == TIXML_SUCCESS)
{
if (SplitN<=1)
break;
if (SplitN>1)
{
vector<unsigned int> jobs = AssignJobs2Threads(m_Original_Grid->GetQtyLines(n)-1, SplitN, true);
unsigned int line=0;
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);
unique(SplitNumber[n].begin(), SplitNumber[n].end());