This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include "orte_config.h"
20 #include "orte/orte_constants.h"
21
22
23 #include <stdio.h>
24 #include <string.h>
25 #include <stdlib.h>
26 #ifdef HAVE_SYS_PARAM_H
27 #include <sys/param.h>
28 #endif
29 #ifdef HAVE_NETINET_IN_H
30 #include <netinet/in.h>
31 #endif
32
33 #include "support.h"
34 #include "orte/runtime/runtime.h"
35
36 #define NUM_ITERS 3
37
38 FILE *test_out;
39
40 int main (int argc, char* argv[])
41 {
42 int rc, i;
43
44 test_init("orte_start_shut");
45 test_out = stderr;
46
47 fprintf(test_out, "initialize the system\n");
48 if (ORTE_SUCCESS != (rc = orte_init(true))) {
49 fprintf(test_out, "couldn't complete init - error code %d\n", rc);
50 exit(1);
51 }
52
53 for (i=0; i < NUM_ITERS; i++) {
54 if (ORTE_SUCCESS != (rc = orte_finalize())) {
55 fprintf(test_out, "iter %d: couldn't complete orte system finalize - error %d\n", i, rc);
56 exit(1);
57 }
58 fprintf(test_out, "\tfinalize successful\n");
59 if (ORTE_SUCCESS != (rc = orte_init(true))) {
60 fprintf(test_out, "iter %d: couldn't complete orte system init - error code %d\n", i, rc);
61 exit(1);
62 }
63 }
64
65 fprintf(test_out, "shut system down\n");
66 if (ORTE_SUCCESS != (rc = orte_finalize())) {
67 fprintf(test_out, "couldn't complete finalize - error code %d\n", rc);
68 exit(1);
69 }
70
71 fprintf(test_out, "orte_start_shut: successful\n");
72
73 rc = test_finalize();
74 fclose(test_out);
75 return rc;
76 }