This source file includes following definitions.
- main
1
2
3
4
5
6
7
8 #include "opal_config.h"
9
10 #include <stdio.h>
11 #include <unistd.h>
12 #include "mpi.h"
13 #include "opal/util/output.h"
14
15 #include "orte/util/show_help.h"
16
17 int main(int argc, char* argv[])
18 {
19 int rank, size;
20 int stream;
21
22 MPI_Init(&argc, &argv);
23 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
24 MPI_Comm_size(MPI_COMM_WORLD, &size);
25
26 if (0 == rank) {
27 opal_output(0, "============================================================================");
28 opal_output(0, "This test ensures that the aggregation functionality of the orte_show_help\nsystem is working properly. It outputs a bogus warning about orte_init(),\nand contains sleep statements to ensure that the timer is firiing properly\nin the HNP and aggregates messages properly. The total sleep time is\n(3 * num_procs). You should see:\n\n - aggregation messages from the HNP every five seconds or so\n - a total of (2 * num_procs) messages");
29 opal_output(0, "============================================================================");
30 }
31 MPI_Barrier(MPI_COMM_WORLD);
32
33 orte_show_help("help-orte-runtime.txt",
34 "orte_init:startup:internal-failure", true,
35 "Nothing", "ORTE_EVERYTHING_IS_PEACHY", "42");
36 sleep(rank * 3);
37
38 orte_show_help("help-orte-runtime.txt",
39 "orte_init:startup:internal-failure", true,
40 "Duplicate orte_show_help detection",
41 "ORTE_SHOW_HELP_DUPLICATE_FAILED", "99999");
42
43 MPI_Barrier(MPI_COMM_WORLD);
44
45 if (0 == rank) {
46 opal_output(0, "============================================================================");
47 opal_output(0, "The test is now complete. Please verify that the HNP output all the required\nmessages (you may see 1 or 2 more messages from the HNP after this message).");
48 opal_output(0, "============================================================================");
49 }
50 MPI_Finalize();
51
52 return 0;
53 }