Repository navigation
Expand file tree
/
Copy pathparadisTest.C
More file actions
67 lines (54 loc) · 1.59 KB
/
Copy pathparadisTest.C
File metadata and controls
67 lines (54 loc) · 1.59 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
/* Written by Richard David Cook
at Lawrence Livermore National Laboratory
Contact: wealthychef@gmail.com
*/
/* just a file to contain a main() for testing paraDIS library */
#include "paradis.h"
#include "debugutil.h"
#include "args.h"
using namespace std;
int main(int argc, char *argv[]) {
long restrictBounds = 0, debugfiles = 0, verbosity=4;
long procnum = 0, numprocs = 1;
char inputfile[2048]="";
argt args[7] = {
{BOOL_TYPE, "-restrict", 1, &restrictBounds},
{BOOL_TYPE, "-debugfiles", 1, &debugfiles},
{LONG_TYPE, "-v", 1, &verbosity},
{LONG_TYPE, "-procnum", 1, &procnum},
{LONG_TYPE, "-numprocs", 1, &numprocs},
{LONG_TYPE, "-verbose", 1, &verbosity},
{STRING_TYPE, "-in", 2048, inputfile}
};
arg_expect_args(args, 7);
arg_ignore_bad_args(1);
arg_parse_args(&argc, argv);
dbg_setverbose(verbosity);
try {
rclib::Point<float> datamin, datamax;
paraDIS::DataSet dsData;
char *datafile = (char*)"../paraDIS_data/rs0443.data";
if (*inputfile) datafile = inputfile;
dsData.SetProcNum(procnum,numprocs);
dsData.SetDataFile(datafile);
dsData.EnableDebugOutput(debugfiles);
dsData.SetOutputDir("debuginfo");
system("mkdir -p debuginfo");
dsData.GetBounds(datamin, datamax, datafile);
/*!
restrict the bounds for fun
*/
/*if (restrictBounds) {
dsData.TestRestrictSubspace();
}*/
dsData.ReadData();
/*!
Does malloc still work?
*/
vector<int> testarray;
testarray.resize(1000000);
} catch (string err) {
cerr <<"Error in main: "<<err<<endl;
}
return 0;
}