Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
ssg
Commits
c06f75e8
Commit
c06f75e8
authored
May 18, 2017
by
Shane Snyder
Browse files
add ifdef to force a swim failure
parent
8f09794e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ssg.c
View file @
c06f75e8
...
...
@@ -149,10 +149,16 @@ ssg_group_id_t ssg_group_create(
SSG_DEBUG
(
g
,
"group lookup successful (size=%d)
\n
"
,
group_size
);
#if USE_SWIM_FD
int
swim_active
=
1
;
#ifdef SWIM_FORCE_FAIL
if
(
g
->
self_rank
==
1
)
swim_active
=
0
;
#endif
/* initialize swim failure detector */
// TODO: we should probably barrier or sync somehow to avoid rpc failures
// due to timing skew of different ranks initializing swim
g
->
fd_ctx
=
(
void
*
)
swim_init
(
g
,
1
);
g
->
fd_ctx
=
(
void
*
)
swim_init
(
g
,
swim_active
);
if
(
g
->
fd_ctx
==
NULL
)
goto
fini
;
#endif
...
...
src/swim-fd/swim-fd-ping.c
View file @
c06f75e8
...
...
@@ -192,6 +192,11 @@ static void swim_dping_recv_ult(hg_handle_t handle)
swim_ctx
=
(
swim_context_t
*
)
g
->
fd_ctx
;
assert
(
swim_ctx
!=
NULL
);
#ifdef SWIM_FORCE_FAIL
int
drop
=
1
;
if
(
g
->
self_rank
==
1
&&
drop
)
goto
fini
;
#endif
hret
=
HG_Get_input
(
handle
,
&
dping_req
);
if
(
hret
!=
HG_SUCCESS
)
goto
fini
;
...
...
@@ -321,6 +326,11 @@ static void swim_iping_recv_ult(hg_handle_t handle)
swim_ctx
=
(
swim_context_t
*
)
g
->
fd_ctx
;
assert
(
swim_ctx
!=
NULL
);
#ifdef SWIM_FORCE_FAIL
int
drop
=
1
;
if
(
g
->
self_rank
==
1
&&
drop
)
goto
fini
;
#endif
hret
=
HG_Get_input
(
handle
,
&
iping_req
);
if
(
hret
!=
HG_SUCCESS
)
goto
fini
;
...
...
tests/ssg-test-simple.c
View file @
c06f75e8
...
...
@@ -142,8 +142,10 @@ int main(int argc, char *argv[])
margo_finalize
(
mid
);
#ifndef SWIM_FORCE_FAIL
if
(
hgctx
)
HG_Context_destroy
(
hgctx
);
if
(
hgcl
)
HG_Finalize
(
hgcl
);
#endif
if
(
strcmp
(
mode
,
"mpi"
)
==
0
)
MPI_Finalize
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment