-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsysconfidence.c
75 lines (59 loc) · 1.96 KB
/
sysconfidence.c
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
71
72
73
74
/*
This file is part of SystemConfidence.
Copyright (C) 2012, UT-Battelle, LLC.
This product includes software produced by UT-Battelle, LLC under Contract No.
DE-AC05-00OR22725 with the Department of Energy.
This program is free software; you can redistribute it and/or modify
it under the terms of the New BSD 3-clause software license (LICENSE).
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
LICENSE for more details.
For more information please contact the SystemConfidence developers at:
systemconfidence-info@googlegroups.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "copyright.h"
#include "config.h"
#include "types.h"
#include "comm.h"
#include "measurement.h"
#include "options.h"
#include "orbtimer.h"
#include "tests.h"
#ifdef USE_XDD
# include "xdd_main.h"
#endif
int main(int argc, char *argv[]) {
measurement_p l,g;
test_p tst = (test_p)malloc(sizeof(test_t));
/* initialize communication and get options */
comm_initialize(tst, &argc, &argv);
ROOTONLY printf("%s\n", COPYRIGHT);
general_options(tst,argc,argv);
/* create measurement structs */
l = measurement_create(tst, "local");
g = measurement_create(tst, "global");
ROOTONLY mkdir(tst->case_name, 0755);
ROOTONLY printf("Confidence: testing...\n");
measurement_collect(tst, l);
ROOTONLY printf("Confidence: local analysis...\n");
measurement_analyze(tst, l, -1.0);
ROOTONLY printf("Confidence: remote analysis\n");
comm_aggregate(g, l);
measurement_analyze(tst, g, -1.0);
ROOTONLY printf("Confidence: saving results\n");
measurement_serialize(tst, g, root_rank);
/* free measurement and test structs */
l = measurement_destroy(l);
g = measurement_destroy(g);
if (tst->argv != NULL)
free(tst->argv);
if (tst->tsdump != NULL)
free(tst->tsdump);
free(tst);
comm_finalize();
return 0;
}