diff --git a/contrib/platform/cisco/macosx-dynamic b/contrib/platform/cisco/macosx-dynamic index 7d0309460d..26b301d684 100644 --- a/contrib/platform/cisco/macosx-dynamic +++ b/contrib/platform/cisco/macosx-dynamic @@ -1,6 +1,6 @@ enable_heartbeat=no enable_multicast=yes -enable_sensors=no +enable_sensors=yes enable_opal_multi_threads=yes enable_ft_thread=no enable_mem_debug=yes diff --git a/orte/test/system/Makefile b/orte/test/system/Makefile index a63605837e..3bd5b59fe0 100644 --- a/orte/test/system/Makefile +++ b/orte/test/system/Makefile @@ -1,4 +1,4 @@ -PROGS = no_op sigusr_trap spin orte_nodename orte_spawn orte_loop_spawn orte_loop_child orte_abort get_limits orte_ring spawn_child orte_tool orte_no_op binom oob_stress iof_stress iof_delay radix orte_barrier orte_mcast opal_interface mcast mcast_recv orte_spin segfault sysinfo orte_exit orte_db +PROGS = no_op sigusr_trap spin orte_nodename orte_spawn orte_loop_spawn orte_loop_child orte_abort get_limits orte_ring spawn_child orte_tool orte_no_op binom oob_stress iof_stress iof_delay radix orte_barrier orte_mcast opal_interface mcast mcast_recv orte_spin segfault sysinfo orte_exit orte_db orte_sensor all: $(PROGS) diff --git a/orte/test/system/Makefile.include b/orte/test/system/Makefile.include index 540a767a22..ff5e40964a 100644 --- a/orte/test/system/Makefile.include +++ b/orte/test/system/Makefile.include @@ -44,5 +44,7 @@ EXTRA_DIST += \ test/system/orte_spawn.c \ test/system/sigusr_trap.c \ test/system/spawn_child.c \ - test/system/spin.c + test/system/spin.c \ + test/system/orte_sensor.c + diff --git a/orte/test/system/orte_sensor.c b/orte/test/system/orte_sensor.c new file mode 100644 index 0000000000..fb206a98b1 --- /dev/null +++ b/orte/test/system/orte_sensor.c @@ -0,0 +1,47 @@ +/* -*- C -*- + * + * $HEADER$ + * + */ +#include +#include + +#include "opal/util/output.h" + +#include "orte/runtime/orte_globals.h" +#include "orte/runtime/runtime.h" +#include "orte/mca/sensor/sensor.h" + +int main(int argc, char* argv[]) +{ + int rc; + char hostname[512]; + pid_t pid; + + if (0 > (rc = orte_init(&argc, &argv, ORTE_PROC_NON_MPI))) { + fprintf(stderr, "orte_mcast: couldn't init orte - error code %d\n", rc); + return rc; + } + + gethostname(hostname, 512); + pid = getpid(); + + printf("orte_sensor: Node %s Name %s Pid %ld\n", + hostname, ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (long)pid); + + /* open and select the sensor modules */ + orte_sensor_base_open(); + orte_sensor_base_select(); + + /* start the sensors - note that we cannot monitor other + * jobs as we are an application. So pass the invalid + * jobid so the sensor modules can know + */ + orte_sensor.start(ORTE_JOBID_INVALID); + + /* just sit here, letting the sensors run */ + opal_event_dispatch(); + + orte_finalize(); + return 0; +}