diff --git a/orte/test/system/get_limits.c b/orte/test/system/get_limits.c index 263bb53feb..bbe26761f3 100644 --- a/orte/test/system/get_limits.c +++ b/orte/test/system/get_limits.c @@ -4,25 +4,24 @@ #include #include #include +#include int main(int argc, char* argv[]) { - int i = 0; - pid_t pid; struct rlimit rlim; if (getrlimit (RLIMIT_NOFILE, &rlim) < 0) fprintf (stderr, "getrlimit (RLIMIT_NOFILE): %s\n", strerror (errno)); else { - printf("softlimit on num_files: %d\thardlimit on num_files: %d\n", rlim.rlim_cur, rlim.rlim_max); + printf("softlimit on num_files: %d\thardlimit on num_files: %d\n", (int)rlim.rlim_cur, (int)rlim.rlim_max); } if (getrlimit (RLIMIT_NPROC, &rlim) < 0) fprintf (stderr, "getrlimit (RLIMIT_NPROC): %s\n", strerror (errno)); else { - printf("softlimit on num_child: %d\thardlimit on num_child: %d\n", rlim.rlim_cur, rlim.rlim_max); + printf("softlimit on num_child: %d\thardlimit on num_child: %d\n", (int)rlim.rlim_cur, (int)rlim.rlim_max); } - printf("RLIM_INFINITY: %d\n", RLIM_INFINITY); + printf("RLIM_INFINITY: %d\n", (int)RLIM_INFINITY); return 0; } diff --git a/orte/test/system/orte_abort.c b/orte/test/system/orte_abort.c index 065f130d3e..660fe41be3 100644 --- a/orte/test/system/orte_abort.c +++ b/orte/test/system/orte_abort.c @@ -9,6 +9,7 @@ #include #include +#include "orte/runtime/runtime.h" #include "orte/util/proc_info.h" int main(int argc, char* argv[]) @@ -19,7 +20,7 @@ int main(int argc, char* argv[]) pid_t pid; char hostname[500]; - if (0 > (rc = orte_init())) { + if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_USE_BARRIER))) { fprintf(stderr, "orte_abort: couldn't init orte - error code %d\n", rc); return rc; } @@ -34,7 +35,9 @@ int main(int argc, char* argv[]) i++; pi = i / 3.14159256; if (i > 10000) i = 0; - if (orte_process_info.my_name->vpid == 3 && i == 9995) { + if ((orte_process_info.my_name->vpid == 3 || + (orte_process_info.num_procs <= 3 && orte_process_info.my_name->vpid == 0)) + && i == 9995) { orte_abort(1, true); } } diff --git a/orte/test/system/orte_loop_child.c b/orte/test/system/orte_loop_child.c index f5e64aa28f..218ce3e56e 100644 --- a/orte/test/system/orte_loop_child.c +++ b/orte/test/system/orte_loop_child.c @@ -1,5 +1,6 @@ #include #include +#include #include "orte/runtime/runtime.h" diff --git a/orte/test/system/orte_loop_spawn.c b/orte/test/system/orte_loop_spawn.c index 9ec850b6cd..1326a08b31 100644 --- a/orte/test/system/orte_loop_spawn.c +++ b/orte/test/system/orte_loop_spawn.c @@ -1,7 +1,9 @@ /*file .c : spawned the file Exe*/ #include +#include #include "opal/threads/condition.h" +#include "opal/util/argv.h" #include "orte/util/proc_info.h" #include "orte/mca/rmgr/rmgr.h" diff --git a/orte/test/system/orte_nodename.c b/orte/test/system/orte_nodename.c index 145bf346f8..a00ffefe75 100644 --- a/orte/test/system/orte_nodename.c +++ b/orte/test/system/orte_nodename.c @@ -6,6 +6,7 @@ */ #include +#include #include "orte/util/proc_info.h" #include "orte/runtime/runtime.h" diff --git a/orte/test/system/orte_proc_subscribe.c b/orte/test/system/orte_proc_subscribe.c index 8995013a29..d36c48c38a 100644 --- a/orte/test/system/orte_proc_subscribe.c +++ b/orte/test/system/orte_proc_subscribe.c @@ -8,7 +8,9 @@ #include #include "opal/threads/condition.h" +#include "opal/util/argv.h" +#include "orte/runtime/runtime.h" #include "orte/util/proc_info.h" #include "orte/dss/dss.h" #include "orte/mca/gpr/gpr.h" @@ -37,7 +39,7 @@ int main(int argc, char* argv[]) OBJ_CONSTRUCT(&cond, opal_condition_t); waitexit = false; - if (0 > (rc = orte_init())) { + if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_USE_BARRIER))) { fprintf(stderr, "couldn't init orte - error code %d\n", rc); return rc; } @@ -106,6 +108,7 @@ static void job_state_callback(orte_jobid_t jobid, orte_proc_state_t state) static void eclipse_launch_cb(orte_gpr_notify_data_t *notify_data, void *user_tag) { +#if 0 int len; orte_std_cntr_t i; orte_std_cntr_t j; @@ -118,6 +121,7 @@ static void eclipse_launch_cb(orte_gpr_notify_data_t *notify_data, void *user_ta char * res; char * kv = NULL; char * vpid = NULL; +#endif fprintf(stderr, "launch cb entered\n"); orte_dss.dump(0, notify_data, ORTE_GPR_NOTIFY_DATA); diff --git a/orte/test/system/orte_ring.c b/orte/test/system/orte_ring.c index 1406ec70ec..804b42cad6 100644 --- a/orte/test/system/orte_ring.c +++ b/orte/test/system/orte_ring.c @@ -10,7 +10,7 @@ #include "orte/runtime/runtime.h" #define MY_TAG 12345 -#define MAX_COUNT 20 +#define MAX_COUNT 3 # define false 0 # define true 1 @@ -25,7 +25,6 @@ main(int argc, char *argv[]){ orte_process_name_t left_peer_orte_name; int num_peers = 0; struct iovec msg; - int ret; /* * Init @@ -81,6 +80,7 @@ main(int argc, char *argv[]){ } } + while (counter <= MAX_COUNT ) { int *cnt; @@ -100,16 +100,19 @@ main(int argc, char *argv[]){ cnt = (int *) msg.iov_base; counter = *cnt; - if(counter > MAX_COUNT) - break; - /* Update */ printf("%s) Recv %d ... Send %d\n", my_name, counter, counter + 1); if( orte_process_info.my_name->vpid == 0 ) { sleep(2); } - counter++; + if(orte_process_info.my_name->vpid == 0) { + counter++; + } + if(counter > MAX_COUNT && right_peer_orte_name.vpid == 0) { + break; + } + /* Send to right */ msg.iov_base = (void *) &counter; msg.iov_len = sizeof(counter); @@ -124,8 +127,6 @@ main(int argc, char *argv[]){ } } - cleanup: - orte_finalize(); return 0; diff --git a/orte/test/system/orte_spawn.c b/orte/test/system/orte_spawn.c index 2d59e40d47..8a03a22dce 100644 --- a/orte/test/system/orte_spawn.c +++ b/orte/test/system/orte_spawn.c @@ -8,6 +8,7 @@ #include #include "opal/threads/condition.h" +#include "opal/util/argv.h" #include "orte/util/proc_info.h" #include "orte/mca/rmgr/rmgr.h" diff --git a/orte/test/system/orte_stage_gate.c b/orte/test/system/orte_stage_gate.c index 5e2cf9ff01..7cb3264605 100644 --- a/orte/test/system/orte_stage_gate.c +++ b/orte/test/system/orte_stage_gate.c @@ -6,12 +6,13 @@ */ #include - +#include "orte_config.h" #ifdef HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ #include "opal/runtime/opal.h" +#include "opal/util/output.h" #include "orte/util/proc_info.h" #include "orte/runtime/runtime.h" diff --git a/orte/test/system/spin.c b/orte/test/system/spin.c index 7001798e06..4ec0119be4 100644 --- a/orte/test/system/spin.c +++ b/orte/test/system/spin.c @@ -7,8 +7,10 @@ */ #include +#include #include "orte/util/proc_info.h" +#include "orte/runtime/runtime.h" int main(int argc, char* argv[]) { @@ -17,7 +19,7 @@ int main(int argc, char* argv[]) double pi; pid_t pid; - if (0 > (rc = orte_init())) { + if (0 > (rc = orte_init(ORTE_NON_INFRASTRUCTURE, ORTE_NON_BARRIER))) { fprintf(stderr, "spin: couldn't init orte - error code %d\n", rc); return rc; }