Triton Repository branch, master, updated. 2bc967ea2524a1a93cc596863cee1e156e619afe
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Triton Repository". The branch, master has been updated via 2bc967ea2524a1a93cc596863cee1e156e619afe (commit) via 0529715ef9f2567be8e607cc6e187927121bb985 (commit) via 325f4bdd8b58fa394e90595829f3563b1d8fc173 (commit) from 48125e56f22f8ec5fc7698c6e174194e70c461f4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2bc967ea2524a1a93cc596863cee1e156e619afe Author: Justin M Wozniak <[email protected]> Date: Tue Mar 13 11:46:12 2012 -0500 Fix node number as string issue; progress on rosd-enqueue commit 0529715ef9f2567be8e607cc6e187927121bb985 Author: Justin M Wozniak <[email protected]> Date: Tue Mar 13 11:40:48 2012 -0500 Drop rosd-test-main commit 325f4bdd8b58fa394e90595829f3563b1d8fc173 Author: Justin M Wozniak <[email protected]> Date: Tue Mar 6 09:57:40 2012 -0600 Duplicate test rosd-injection and rosd-enqueue ----------------------------------------------------------------------- Summary of changes: code/src/fakess/fakess.ae | 28 ++--------- code/src/fakess/fakess.hae | 2 - code/src/mapping/mapping.ae | 6 ++- code/src/rebuild/rebuild.ae | 3 + code/src/replicated-osd/tests/module.mk.in | 9 ---- code/src/state/state.ae | 11 ++++- code/src/state/state.hae | 2 - code/src/state/tests/module.mk.in | 19 ++++---- .../tests/{rosd-injection.ae => rosd-enqueue.ae} | 50 ++++++++++++++++---- .../tests/{rosd-injection.sh => rosd-enqueue.sh} | 10 ++-- code/src/state/tests/rosd-injection.sh | 2 + 11 files changed, 78 insertions(+), 64 deletions(-) copy code/src/state/tests/{rosd-injection.ae => rosd-enqueue.ae} (67%) copy code/src/state/tests/{rosd-injection.sh => rosd-enqueue.sh} (67%) Diff of changes: diff --git a/code/src/fakess/fakess.ae b/code/src/fakess/fakess.ae index daea3cd..c2097e8 100644 --- a/code/src/fakess/fakess.ae +++ b/code/src/fakess/fakess.ae @@ -189,25 +189,9 @@ triton_ret_t triton_fakess_init_stage2(void) return result; } -__blocking triton_ret_t triton_fakess_init_self(void) -{ - triton_ret_t result; - triton_node_t self; - - assert(!self_initialized); - - self = triton_map_self(); - result = triton_fakess_node_add(self); - if (result != TRITON_SUCCESS) return result; - - self_initialized = true; - return TRITON_SUCCESS; -} - __blocking void triton_fakess_state_install(void) { triton_debug(debug_system, "triton_fakess_state_install\n"); - triton_state.init_self = triton_fakess_init_self; triton_state.list = triton_fakess_list; triton_state.size = triton_fakess_size; triton_state.load = triton_fakess_load_map; @@ -222,6 +206,7 @@ __blocking void triton_fakess_state_install(void) triton_state.propagation = triton_fakess_propagation; triton_state.shutdown = triton_fakess_shutdown; triton_state.finalize = triton_fakess_finalize; + triton_fakess_self = triton_map_self(); } static struct triton_state_table *lookup_node(triton_node_t node); @@ -351,9 +336,7 @@ triton_ret_t triton_fakess_load_map(void) triton_ret_t error; assert(initialized); - triton_map_get(&list); - triton_list_for_each_entry(map, scratch, list, triton_map_t, link) { @@ -460,18 +443,17 @@ __blocking void triton_fakess_broadcast(triton_msg_tag_t tag, triton_state_peer_t *peer; triton_state_peer_t *scratch; triton_addr_t addr; - triton_node_t self; + triton_string_t s1; + triton_string_t s2; + int i = 0; - triton_string_t tmp2; assert(length < TRITON_FAKESS_SIZE_MESSAGE); - self = triton_map_self(); - triton_list_for_each_entry(peer, scratch, &triton_fakess_peers, triton_state_peer_t, link) { if (triton_cmp_node(peer->node, triton_node_null) && - triton_cmp_node(peer->node, self)) + triton_cmp_node(peer->node, triton_fakess_self)) { triton_map_lookup_node(peer->node, &addr); triton_debug(debug_trace, "send\n"); diff --git a/code/src/fakess/fakess.hae b/code/src/fakess/fakess.hae index 9a4eecf..953820d 100644 --- a/code/src/fakess/fakess.hae +++ b/code/src/fakess/fakess.hae @@ -23,8 +23,6 @@ #define TRITON_FAKESS_UNSET ((void *)1) -__blocking triton_ret_t triton_fakess_init_self(void); - __blocking void triton_fakess_state_install(void); triton_ret_t triton_fakess_list(triton_node_t *list); diff --git a/code/src/mapping/mapping.ae b/code/src/mapping/mapping.ae index 4f069dd..11beba5 100644 --- a/code/src/mapping/mapping.ae +++ b/code/src/mapping/mapping.ae @@ -114,7 +114,8 @@ triton_ret_t triton_map_file(const char *filename) } /** - Initialize the triton_place_map + Initialize the triton_place_map from file + File should contain node numbers in hexadecimal */ triton_ret_t triton_map_read(FILE *file) { @@ -287,6 +288,7 @@ __attribute__((constructor)) void triton_mapping_init_register(void) * Generates a temporary file containing a mapping for servers from <default method>://0 * to <default method>://<servercount-1>. The name of the file is returned by the * function and must be freed by the caller. Returns NULL on failure. + * Produces node numbers in hexadecimal */ char* triton_map_generate_mapfile(int servercount) { @@ -317,7 +319,7 @@ char* triton_map_generate_mapfile(int servercount) for(i=0; i<servercount; i++) { - dprintf(fd, "%s://%llu\t%llu.1\n", method, llu(i), llu((INT64_MAX/big_servercount) * i)); + dprintf(fd, "%s://%llu\t%llX.1\n", method, llu(i), llu((INT64_MAX/big_servercount) * i)); } return(filename); diff --git a/code/src/rebuild/rebuild.ae b/code/src/rebuild/rebuild.ae index 5c7c0c6..58b2f2a 100644 --- a/code/src/rebuild/rebuild.ae +++ b/code/src/rebuild/rebuild.ae @@ -54,6 +54,7 @@ __blocking void enumerate_stub_wus(triton_node_t self, triton_rebuild_wu_stub_t *wu; triton_ret_t ret; triton_node_t other; + char s[TRITON_UINT128_STRLEN]; printf("rebuild: enumerate work units...\n"); @@ -66,6 +67,8 @@ __blocking void enumerate_stub_wus(triton_node_t self, break; for (i = 0; i < actual; i++) { + triton_uint128_to_string(s, TRITON_UINT128_STRLEN, working[i]); + printf("oid: %s\n"); ret = triton_place_lookup(working[i], 3, closest); triton_error_assert(ret); if (contains(closest, 3, failed) && diff --git a/code/src/replicated-osd/tests/module.mk.in b/code/src/replicated-osd/tests/module.mk.in index bf03b77..e5aa6d1 100644 --- a/code/src/replicated-osd/tests/module.mk.in +++ b/code/src/replicated-osd/tests/module.mk.in @@ -2,21 +2,12 @@ DIR := src/replicated-osd/tests ifneq (,$(BUILD_MPI)) -src/replicated-osd/tests/rosd-test-main.o: $(srcdir)/src/replicated-osd/tests/rosd-test-main.ae - $(Q) " AECC $@" - $(E)$(builddir)/maint/aecc \ - -o src/replicated-osd/tests/rosd-test-main.o \ - $< \ - -c $(call MCC_AE,$*) $(VA) $(DA) $(AEPRETTY) \ - -- $(LIBCFLAGS) $(CFLAGS) $(CWARNS) - AETESTSRC += $(DIR)/rosd-create-bench.ae MODCFLAGS_$(DIR)/rosd-create-bench = $(MPICFLAGS) MODLDFLAGS_$(DIR)/rosd-create-bench = $(MPILDFLAGS) MODLIBS_$(DIR)/rosd-create-bench = $(MPILIBS) MODCC_$(DIR)/rosd-create-bench = $(MPICC) -AETESTSRC += $(DIR)/rosd-test-builder.ae MODCFLAGS_$(DIR)/rosd-test-builder = $(MPICFLAGS) MODLDFLAGS_$(DIR)/rosd-test-builder = $(MPILDFLAGS) MODLIBS_$(DIR)/rosd-test-builder = $(MPILIBS) diff --git a/code/src/state/state.ae b/code/src/state/state.ae index ec3e396..b26c8de 100644 --- a/code/src/state/state.ae +++ b/code/src/state/state.ae @@ -72,6 +72,7 @@ __blocking void triton_state_monitor() triton_status_t *status; triton_ret_t ret; bool running; + triton_string_t s; printf("state: monitoring state changes...\n"); @@ -87,7 +88,7 @@ __blocking void triton_state_monitor() triton_error_assert(ret); /* wait for all nodes to post status=NOMINAL */ - triton_timer(1000); + triton_timer(2000); pwait { @@ -105,7 +106,13 @@ __blocking void triton_state_monitor() { peer = entry->node; data = triton_state.lookup(peer, &key); - assert(data); + if (data == NULL) + { + triton_node_to_string(peer, &s); + printf("data not found: node: %s:%s", + triton_string_get(&s), triton_string_get(&key)); + exit(1); + } while (true) { diff --git a/code/src/state/state.hae b/code/src/state/state.hae index d62637a..b812e4b 100644 --- a/code/src/state/state.hae +++ b/code/src/state/state.hae @@ -43,8 +43,6 @@ struct triton_state_funcs { triton_ret_t (*init)(void); - __blocking triton_ret_t (*init_self)(void); - triton_ret_t (*list)(triton_node_t *list); int (*size)(void); diff --git a/code/src/state/tests/module.mk.in b/code/src/state/tests/module.mk.in index 5175b4b..2a2e880 100644 --- a/code/src/state/tests/module.mk.in +++ b/code/src/state/tests/module.mk.in @@ -15,15 +15,8 @@ STATE_TEST_SRC += $(DIR)/rpc-size.ae STATE_TEST_SRC += $(DIR)/rpc-global.ae STATE_TEST_SRC += $(DIR)/rpc-list.ae STATE_TEST_SRC += $(DIR)/rosd-start.ae -# STATE_TEST_SRC += $(DIR)/rosd-global.ae -# STATE_TEST_SRC += $(DIR)/rosd-status.ae -# STATE_TEST_SRC += $(DIR)/rosd-trigger.ae -# STATE_TEST_SRC += $(DIR)/rosd-peers.ae -# STATE_TEST_SRC += $(DIR)/rosd-maint.ae STATE_TEST_SRC += $(DIR)/rosd-injection.ae -# Still needs some work: -# STATE_TEST_SRC += $(DIR)/rosd-recover.ae -# AETESTSRC += $(DIR)/state-client.ae +STATE_TEST_SRC += $(DIR)/rosd-enqueue.ae STATE_TESTS = $(patsubst %.ae,%,$(STATE_TEST_SRC)) @@ -103,4 +96,12 @@ MODCFLAGS_$(DIR)/rosd-injection = $(MPICFLAGS) \ MODLDFLAGS_$(DIR)/rosd-injection = $(MPILDFLAGS) MODLIBS_$(DIR)/rosd-injection = $(MPILIBS) MODCC_$(DIR)/rosd-injection = $(MPICC) -MODLINKWITH_$(DIR)/rosd-injection = src/replicated-osd/tests/rosd-test-builder.o \ No newline at end of file +MODLINKWITH_$(DIR)/rosd-injection = src/replicated-osd/tests/rosd-test-builder.o + +MODCFLAGS_$(DIR)/rosd-enqueue = $(MPICFLAGS) \ + -D ROSD_DISABLE_FAKESS=$(ROSD_DISABLE_FAKESS) \ + -Wunused-variable +MODLDFLAGS_$(DIR)/rosd-enqueue = $(MPILDFLAGS) +MODLIBS_$(DIR)/rosd-enqueue = $(MPILIBS) +MODCC_$(DIR)/rosd-enqueue = $(MPICC) +MODLINKWITH_$(DIR)/rosd-enqueue = src/replicated-osd/tests/rosd-test-builder.o diff --git a/code/src/state/tests/rosd-injection.ae b/code/src/state/tests/rosd-enqueue.ae similarity index 67% copy from code/src/state/tests/rosd-injection.ae copy to code/src/state/tests/rosd-enqueue.ae index 301769b..56fd595 100644 --- a/code/src/state/tests/rosd-injection.ae +++ b/code/src/state/tests/rosd-enqueue.ae @@ -20,6 +20,7 @@ #include "src/net/triton-message-method.hae" #include "src/net/mock/mock-method.h" #include "src/common/triton-init.h" +#include "src/common/traffic-cop.hae" #include "src/common/resources/scheduling/sched.hae" #include "src/common/resources/timer/timer.hae" #include "src/zeroconf/zeroconf.h" @@ -42,6 +43,8 @@ #include "src/replicated-osd/rosd_stubs.hae" #include "src/remote/core_stubs.hae" +// #include "src/replicated-osd/rosd-test-harness.hae" + #include "mpi.h" __blocking triton_ret_t rosd_test_client_fn(int nservers, @@ -56,6 +59,10 @@ __blocking triton_ret_t rosd_test_client_fn(int nservers, uint128_t oid; triton_string_t s; triton_status_t *status; + struct rosd_create_req req; + uint32_t flags = 0; + uint32_t rep_factor = 1; + uint64_t niid; triton_uint128_setzero(oid); @@ -65,6 +72,11 @@ __blocking triton_ret_t rosd_test_client_fn(int nservers, MPI_Comm_rank(client_comm, &rank); printf("rosd-injection: rosd_client_fn(): rank: %i\n", rank); + if (rank != 0) + { + return TRITON_SUCCESS; + } + ret = triton_place_lookup(oid, 1, &svr_node); triton_error_assert(ret); @@ -73,19 +85,39 @@ __blocking triton_ret_t rosd_test_client_fn(int nservers, triton_addr_to_string(svr_addr, &s); printf("addr: %s\n", triton_string_get(&s)); - triton_string_destroy(&s); - // triton_timer(rank*1000-2000); + niid = traffic_cop_rpc_register(); - /* only one client sets the status */ - if (rank == 0) + ret = aer_init_struct_rosd_create_req(&req, &oid, &flags, &rep_factor, &niid); + triton_error_assert(ret); + + aer_destroy_struct_rosd_create_req(&req); + + ret = triton_map_lookup_node(svr_node, &svr_addr); + triton_error_assert(ret); + + ret = remote_rosd_create(AER_DEFAULT_CTX, svr_addr, &req, NULL); + if(ret != TRITON_SUCCESS) { - status = malloc(sizeof(triton_status_t)); - *status = TRITON_STATUS_INJECTED; - ret = remote_state_client_admin_status_set - (AER_DEFAULT_CTX, svr_addr, status, NULL); - triton_error_assert(ret); + printf("error name: %s\n", ret->name); + triton_error_print(ret, "Error: rosd_create() failure."); } + + traffic_cop_rpc_unregister(niid); + + // triton_string_destroy(&s); + + // triton_timer(rank*1000-2000); + + /* only one client sets the status */ + /* if (rank == 0) */ + /* { */ + /* status = malloc(sizeof(triton_status_t)); */ + /* *status = TRITON_STATUS_INJECTED; */ + /* ret = remote_state_client_admin_status_set */ + /* (AER_DEFAULT_CTX, svr_addr, status, NULL); */ + /* triton_error_assert(ret); */ + /* } */ return TRITON_SUCCESS; } diff --git a/code/src/state/tests/rosd-injection.sh b/code/src/state/tests/rosd-enqueue.sh similarity index 67% copy from code/src/state/tests/rosd-injection.sh copy to code/src/state/tests/rosd-enqueue.sh index 7db691b..305665f 100755 --- a/code/src/state/tests/rosd-injection.sh +++ b/code/src/state/tests/rosd-enqueue.sh @@ -11,14 +11,12 @@ OUT=${BIN}.out # export aesop_remote_default_net=fault export triton_traffic_cop_static_timeout=10 -# TODO: skipping this test for now; comment out the following 2 lines to -# re-enable it -# echo "SKIPPING: Test broken as of 2011-12-07" -# exit 0 +PROCS=6 +SERVERS=3 # Test with sorted input... -mpiexec -l -n 4 ${VALGRIND} ${BIN} /tmp/rosd.db /tmp/rosd-log \ - 1 1 2 1 > ${OUT} 2>&1 +mpiexec -l -n ${PROCS} ${VALGRIND} ${BIN} /tmp/rosd.db /tmp/rosd-log \ + 1 1 ${SERVERS} 1 > ${OUT} 2>&1 # [[ $? == 0 ]] || exit 1 diff --git a/code/src/state/tests/rosd-injection.sh b/code/src/state/tests/rosd-injection.sh index 7db691b..e852fd5 100755 --- a/code/src/state/tests/rosd-injection.sh +++ b/code/src/state/tests/rosd-injection.sh @@ -16,6 +16,8 @@ export triton_traffic_cop_static_timeout=10 # echo "SKIPPING: Test broken as of 2011-12-07" # exit 0 +rm -r /tmp/rosd.db /tmp/rosd-log + # Test with sorted input... mpiexec -l -n 4 ${VALGRIND} ${BIN} /tmp/rosd.db /tmp/rosd-log \ 1 1 2 1 > ${OUT} 2>&1 hooks/post-receive -- Triton Repository
participants (1)
-
noreply@mcs.anl.gov