new openEMS option --engine=fastest & options console output

this new option should always choose the (in most cases) fastest engine available
This commit is contained in:
Thorsten Liebig 2010-05-21 08:16:24 +02:00
parent 6bc146a3fb
commit d882899ed2
2 changed files with 19 additions and 1 deletions

View File

@ -40,7 +40,19 @@ int main(int argc, char *argv[])
if (argc<=1)
{
cout << " usage: openEMS FDTD_XML_FILE [--disable-dumps] [--debug-material] [--debug-operator]" << endl;
cout << " Usage: openEMS <FDTD_XML_FILE> [<options>...]" << endl << endl;
cout << " <options>" << endl;
cout << "\t--disable-dumps\t\tDisable all field dumps for faster simulation" << endl;
cout << "\t--debug-material\tDump material distribution to a vtk file for debugging" << endl;
cout << "\t--debug-operator\tDump operator to vtk file for debugging" << endl;
cout << "\t--debug-boxes\t\tDump e.g. probe boxes to vtk file for debugging" << endl;
cout << "\t--engine=<type>\t\tChoose engine type" << endl;
cout << "\t\t--engine=fastest\t\tfastest available engine" << endl;
cout << "\t\t--engine=sse\t\t\tengine using sse vector extensions" << endl;
cout << "\t\t--engine=sse_compressed\t\tengine using compressed operator + sse vector extensions" << endl;
cout << "\t\t--engine=multithreaded\t\tengine using compressed operator + sse vector extensions + multithreading" << endl;
cout << "\t--numThreads=<n>\tForce use n threads for multithreaded engine (needs: --engine=multithreaded)" << endl;
cout << endl;
exit(-1);
}

View File

@ -125,6 +125,12 @@ bool openEMS::parseCommandLineArgument( const char *argv )
m_engine = EngineType_SSE_Compressed;
return true;
}
else if (strcmp(argv,"--engine=fastest")==0)
{
cout << "openEMS - enabled multithreading engine" << endl;
m_engine = EngineType_Multithreaded;
return true;
}
return false;
}