-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
71 lines (57 loc) · 1.41 KB
/
main.cpp
File metadata and controls
71 lines (57 loc) · 1.41 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*******************************************************************
*
* DESCRIPTION: main
*
* DATE: 12/11/99
* DATE: 30/08/2000 (v3)
*
*******************************************************************/
/** include files **/
#include <iostream>
#include <string>
#include "strutil.h" // isNumeric
#include "stdaload.h" // class StandAloneLoader
#include "netload.h" // class NetLoader
#include "parsimu.h" // class ParallelMainSimulator
#include "pmodeladm.h" // class SingleParallelModelAdm
using namespace std;
int main( int argc, char *argv[] )
{
SimLoader *loader = NULL;
try
{
#ifndef __unix__
loader = new StandAloneLoader(argc, argv);
#else
#ifdef __ONLY_STAND_ALONE_MODE__
loader = new StandAloneLoader(argc, argv);
#else
if( argc == 1 ) {
cout << "PCD++" << endl;
cout << "The network loader is not currently supported" << endl;
cout << endl << "Please run pcd -h for help" << endl;
return 0;
//loader = new NetworkLoader(argc, argv);
} else {
loader = new StandAloneLoader(argc, argv) ;
}
#endif
#endif
ParallelMainSimulator::Instance().loader( loader );
ParallelMainSimulator::Instance().run();
} catch( const MException &e )
{
e.print(cerr);
if (loader != NULL)
loader->closeComm();
} catch( ... )
{
cerr << "Unknown Exception!!! " << endl;
if (loader != NULL)
loader->closeComm();
}
if (loader != NULL) {
delete loader;
}
return 0;
}