-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cxx
35 lines (30 loc) · 901 Bytes
/
main.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <Exception.hxx>
#include <iostream>
#include "EvacWorld.hxx"
#include "EvacConfig.hxx"
#include <cstdlib>
//#include <Config.hxx>
int main(int argc, char *argv[])
{
try
{
if (argc >2)
{
throw Engine::Exception("Compile in the following way: Evacuation [config file]");
}
std::string fileName("config.xml");
if (argc == 2)
{
fileName = argv[1];
}
Evacuation::EvacWorld myWorld (new Evacuation::EvacConfig(fileName), myWorld.useSpacePartition()); //useOpenMPSingleNode
std::cout << "nthread?: " << myWorld.getNumTasks() << std::endl;
myWorld.initialize(argc, argv);
myWorld.run();
}
catch( std::exception & exceptionThrown )
{
std::cout << "exception thrown: " << exceptionThrown.what() << std::endl;
}
return 0;
}