fix in openEMS MPI setup

pull/1/head
Thorsten Liebig 2011-11-08 10:15:36 +01:00
parent b34848f323
commit c9357823ff
1 changed files with 9 additions and 4 deletions

View File

@ -131,17 +131,22 @@ bool openEMS_FDTD_MPI::parseCommandLineArgument( const char *argv )
bool openEMS_FDTD_MPI::SetupMPI(TiXmlElement* FDTD_Opts) bool openEMS_FDTD_MPI::SetupMPI(TiXmlElement* FDTD_Opts)
{ {
//manipulate geometry for this part... TiXmlElement* MPI_Elem = FDTD_Opts->FirstChildElement("MPI");
UNUSED(FDTD_Opts);
if (!m_MPI_Enabled) if (!m_MPI_Enabled)
{ {
if (g_settings.GetVerboseLevel()>0) if ((MPI_Elem!=NULL))
cerr << "openEMS_FDTD_MPI::SetupMPI: Warning: Number of MPI processes is 1, skipping MPI engine... " << endl; cerr << "openEMS_FDTD_MPI::SetupMPI: Warning: Number of MPI processes is 1, skipping MPI engine... " << endl;
return true; return true;
} }
TiXmlElement* MPI_Elem = FDTD_Opts->FirstChildElement("MPI"); if (MPI_Elem==NULL)
{
MPI_Barrier(MPI_COMM_WORLD);
if (m_MyID==0)
cerr << "openEMS_FDTD_MPI::SetupMPI: Error: no MPI settings found, exiting MPI engine... " << endl;
exit(-1);
}
CSRectGrid* grid = m_CSX->GetGrid(); CSRectGrid* grid = m_CSX->GetGrid();
delete m_Original_Grid; delete m_Original_Grid;