From 4026a9c873ea483f47cff76ffba3356711db048a Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 4 Dec 2009 04:31:06 +0000 Subject: [PATCH] Update all the tests to the new orte_init API This commit was SVN r22263. --- orte/test/system/binom.c | 2 +- orte/test/system/iof_delay.c | 2 +- orte/test/system/iof_stress.c | 2 +- orte/test/system/oob_stress.c | 2 +- orte/test/system/opal_interface.c | 2 +- orte/test/system/orte_abort.c | 2 +- orte/test/system/orte_barrier.c | 2 +- orte/test/system/orte_loop_child.c | 4 +++- orte/test/system/orte_loop_spawn.c | 4 +++- orte/test/system/orte_mcast.c | 2 +- orte/test/system/orte_no_op.c | 2 +- orte/test/system/orte_nodename.c | 2 +- orte/test/system/orte_ring.c | 2 +- orte/test/system/orte_spawn.c | 5 ++--- orte/test/system/orte_spin.c | 2 +- orte/test/system/orte_tool.c | 2 +- orte/test/system/radix.c | 2 +- orte/test/system/sigusr_trap.c | 2 +- orte/test/system/spawn_child.c | 2 +- orte/test/system/spin.c | 2 +- orte/test/system/sysinfo.c | 2 +- 21 files changed, 26 insertions(+), 23 deletions(-) diff --git a/orte/test/system/binom.c b/orte/test/system/binom.c index a8aab771a4..486d0563a1 100644 --- a/orte/test/system/binom.c +++ b/orte/test/system/binom.c @@ -112,7 +112,7 @@ int main(int argc, char* argv[]) exit(1); } - orte_init(ORTE_PROC_TOOL); + orte_init(&argc, &argv, ORTE_PROC_TOOL); num_procs = atoi(argv[1]); diff --git a/orte/test/system/iof_delay.c b/orte/test/system/iof_delay.c index da2c55ada9..6c02a8b90c 100644 --- a/orte/test/system/iof_delay.c +++ b/orte/test/system/iof_delay.c @@ -22,7 +22,7 @@ main(int argc, char *argv[]){ /* * Init */ - orte_init(ORTE_NON_TOOL); + orte_init(&argc, &argv, ORTE_PROC_NON_MPI); if (argc >= 2) { count = atoi(argv[1]); diff --git a/orte/test/system/iof_stress.c b/orte/test/system/iof_stress.c index 99eb976c1d..56364d4f28 100644 --- a/orte/test/system/iof_stress.c +++ b/orte/test/system/iof_stress.c @@ -23,7 +23,7 @@ main(int argc, char *argv[]){ /* * Init */ - orte_init(ORTE_NON_TOOL); + orte_init(&argc, &argv, ORTE_PROC_NON_MPI); if (argc >= 2) { count = atoi(argv[1]); diff --git a/orte/test/system/oob_stress.c b/orte/test/system/oob_stress.c index 23a1a8360a..f3e08d0203 100644 --- a/orte/test/system/oob_stress.c +++ b/orte/test/system/oob_stress.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]){ /* * Init */ - orte_init(ORTE_NON_TOOL); + orte_init(&argc, &argv, ORTE_PROC_NON_MPI); if (argc > 1) { count = atoi(argv[1]); diff --git a/orte/test/system/opal_interface.c b/orte/test/system/opal_interface.c index a4750abaf6..fc711a6fef 100644 --- a/orte/test/system/opal_interface.c +++ b/orte/test/system/opal_interface.c @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) uint32_t addr, netmask, netaddr; struct sockaddr_in inaddr; - if (0 > (rc = opal_init())) { + if (0 > (rc = opal_init(&argc, &argv))) { fprintf(stderr, "orte_interface: couldn't init opal - error code %d\n", rc); return rc; } diff --git a/orte/test/system/orte_abort.c b/orte/test/system/orte_abort.c index 8f9d4fdc6b..10b2daa5b6 100644 --- a/orte/test/system/orte_abort.c +++ b/orte/test/system/orte_abort.c @@ -23,7 +23,7 @@ int main(int argc, char* argv[]) pid_t pid; char hostname[500]; - if (0 > (rc = orte_init(ORTE_NON_TOOL))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "orte_abort: couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/orte_barrier.c b/orte/test/system/orte_barrier.c index 87887f7b18..28f860fdeb 100644 --- a/orte/test/system/orte_barrier.c +++ b/orte/test/system/orte_barrier.c @@ -12,7 +12,7 @@ int main(int argc, char* argv[]) { - if (ORTE_SUCCESS != orte_init(ORTE_NON_TOOL)) { + if (ORTE_SUCCESS != orte_init(&argc, &argv, ORTE_PROC_NON_MPI)) { fprintf(stderr, "Failed orte_init\n"); exit(1); } diff --git a/orte/test/system/orte_loop_child.c b/orte/test/system/orte_loop_child.c index 57479543de..aed271903b 100644 --- a/orte/test/system/orte_loop_child.c +++ b/orte/test/system/orte_loop_child.c @@ -2,6 +2,8 @@ #include #include +#include "orte/constants.h" + #include "orte/util/proc_info.h" #include "orte/runtime/runtime.h" @@ -9,7 +11,7 @@ int main( int argc, char **argv ) { int rc; - if (ORTE_SUCCESS != (rc = orte_init(ORTE_PROC_TOOL))) { + if (ORTE_SUCCESS != (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/orte_loop_spawn.c b/orte/test/system/orte_loop_spawn.c index 4246618b88..96f408159a 100644 --- a/orte/test/system/orte_loop_spawn.c +++ b/orte/test/system/orte_loop_spawn.c @@ -2,6 +2,8 @@ #include #include +#include "orte/constants.h" + #include "opal/util/argv.h" #include "orte/mca/plm/plm.h" @@ -17,7 +19,7 @@ int main(int argc, char* argv[]) char cwd[1024]; int iter; - if (0 > (rc = orte_init(ORTE_NON_TOOL))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/orte_mcast.c b/orte/test/system/orte_mcast.c index e9ad8dca47..3fa6651ccb 100644 --- a/orte/test/system/orte_mcast.c +++ b/orte/test/system/orte_mcast.c @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) int32_t i32=1; struct iovec iovec_array[3]; - if (0 > (rc = orte_init(ORTE_PROC_NON_MPI))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "orte_nodename: couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/orte_no_op.c b/orte/test/system/orte_no_op.c index 03ae0d3a5d..a96c94b66f 100644 --- a/orte/test/system/orte_no_op.c +++ b/orte/test/system/orte_no_op.c @@ -11,7 +11,7 @@ int main(int argc, char* argv[]) { - if (ORTE_SUCCESS != orte_init(ORTE_NON_TOOL)) { + if (ORTE_SUCCESS != orte_init(&argc, &argv, ORTE_PROC_NON_MPI)) { fprintf(stderr, "Failed orte_init\n"); exit(1); } diff --git a/orte/test/system/orte_nodename.c b/orte/test/system/orte_nodename.c index 3a1e70528d..5fded00ef0 100644 --- a/orte/test/system/orte_nodename.c +++ b/orte/test/system/orte_nodename.c @@ -19,7 +19,7 @@ int main(int argc, char* argv[]) char hostname[512]; pid_t pid; - if (0 > (rc = orte_init(ORTE_PROC_NON_MPI))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "orte_nodename: couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/orte_ring.c b/orte/test/system/orte_ring.c index 9963fbe308..081ab0c69d 100644 --- a/orte/test/system/orte_ring.c +++ b/orte/test/system/orte_ring.c @@ -29,7 +29,7 @@ main(int argc, char *argv[]){ /* * Init */ - orte_init(ORTE_NON_TOOL); + orte_init(&argc, &argv, ORTE_PROC_NON_MPI); num_peers = orte_process_info.num_procs; diff --git a/orte/test/system/orte_spawn.c b/orte/test/system/orte_spawn.c index 9b8ca36396..a5812e61ec 100644 --- a/orte/test/system/orte_spawn.c +++ b/orte/test/system/orte_spawn.c @@ -29,7 +29,7 @@ int main(int argc, char* argv[]) struct iovec msg; orte_vpid_t i; - if (0 > (rc = orte_init(ORTE_NON_TOOL))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "couldn't init orte - error code %d\n", rc); return rc; } @@ -57,8 +57,7 @@ int main(int argc, char* argv[]) jdata->map->display_map = true; #endif /* launch the job */ - fprintf(stderr, "Parent: My local rank is %ld with %ld num_local_procs - spawning children!\n", - (long)orte_process_info.local_rank, (long)orte_process_info.num_local_procs); + fprintf(stderr, "Parent: spawning children!\n"); if (ORTE_SUCCESS != (rc = orte_plm.spawn(jdata))) { ORTE_ERROR_LOG(rc); orte_finalize(); diff --git a/orte/test/system/orte_spin.c b/orte/test/system/orte_spin.c index f1b106105c..d00385ea0b 100644 --- a/orte/test/system/orte_spin.c +++ b/orte/test/system/orte_spin.c @@ -16,7 +16,7 @@ int main(int argc, char* argv[]) int i; double pi; - orte_init(ORTE_PROC_NON_MPI); + orte_init(&argc, &argv, ORTE_PROC_NON_MPI); i = 0; while (1) { diff --git a/orte/test/system/orte_tool.c b/orte/test/system/orte_tool.c index d705349f42..c81fb7a2a3 100644 --- a/orte/test/system/orte_tool.c +++ b/orte/test/system/orte_tool.c @@ -28,7 +28,7 @@ int main(int argc, char* argv[]) orte_app_context_t *app; char cwd[OPAL_PATH_MAX]; - if (0 > (rc = orte_init(ORTE_PROC_TOOL))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_TOOL))) { fprintf(stderr, "orte_tool: couldn't init orte\n"); return rc; } diff --git a/orte/test/system/radix.c b/orte/test/system/radix.c index 642fb809c7..68a2d22b7c 100644 --- a/orte/test/system/radix.c +++ b/orte/test/system/radix.c @@ -87,7 +87,7 @@ main(int argc, char **argv) exit(1); } - orte_init(ORTE_PROC_TOOL); + orte_init(&argc, &argv, ORTE_PROC_NON_MPI); Radix = atoi(argv[1]); NProcs = atoi(argv[2]); diff --git a/orte/test/system/sigusr_trap.c b/orte/test/system/sigusr_trap.c index 2a575ded95..fc2433130f 100644 --- a/orte/test/system/sigusr_trap.c +++ b/orte/test/system/sigusr_trap.c @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) int i; double pi; - orte_init(ORTE_PROC_TOOL_WNAME); + orte_init(&argc, &argv, ORTE_PROC_TOOL); if (signal(SIGUSR1, sigusr_handler) == SIG_IGN) { fprintf(stderr, "Could not setup signal trap for SIGUSR1\n"); diff --git a/orte/test/system/spawn_child.c b/orte/test/system/spawn_child.c index 91f41c8fb0..e1062bb4ed 100644 --- a/orte/test/system/spawn_child.c +++ b/orte/test/system/spawn_child.c @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) printf("CHILD starting: Node %s Pid %ld\n", hostname, (long)pid); - if (0 > (rc = orte_init(ORTE_NON_TOOL))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "orte_nodename: couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/spin.c b/orte/test/system/spin.c index c137ed4a14..8a640e64a5 100644 --- a/orte/test/system/spin.c +++ b/orte/test/system/spin.c @@ -20,7 +20,7 @@ int main(int argc, char* argv[]) double pi; pid_t pid; - if (0 > (rc = orte_init(ORTE_PROC_NON_MPI))) { + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { fprintf(stderr, "spin: couldn't init orte - error code %d\n", rc); return rc; } diff --git a/orte/test/system/sysinfo.c b/orte/test/system/sysinfo.c index 73bc470c8b..f2cfaf2ff9 100644 --- a/orte/test/system/sysinfo.c +++ b/orte/test/system/sysinfo.c @@ -29,7 +29,7 @@ int main(int argc, char* argv[]) opal_list_item_t *item; char *model; - if (ORTE_SUCCESS != orte_init(ORTE_PROC_NON_MPI)) { + if (ORTE_SUCCESS != orte_init(&argc, &argv, ORTE_PROC_NON_MPI)) { fprintf(stderr, "Failed orte_init\n"); exit(1); }