Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ssg
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
ssg
Commits
1dfa47cd
Commit
1dfa47cd
authored
Dec 14, 2018
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework testing to account for pmix
parent
a658feb2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
27 deletions
+80
-27
tests/Makefile.subdir
tests/Makefile.subdir
+11
-6
tests/simple-group-mpi.sh
tests/simple-group-mpi.sh
+1
-1
tests/simple-group-pmix.sh
tests/simple-group-pmix.sh
+22
-0
tests/ssg-launch-group.c
tests/ssg-launch-group.c
+32
-15
tests/test-util.sh
tests/test-util.sh
+14
-5
No files found.
tests/Makefile.subdir
View file @
1dfa47cd
TESTS_ENVIRONMENT
+=
\
MKTEMP
=
"
$(MKTEMP)
"
check_PROGRAMS
+=
\
tests/ssg-launch-group
\
tests/ssg-join-leave-group
EXTRA_DIST
+=
\
tests/test-util.sh
if
SSG_HAVE_MPI
check_PROGRAMS
+=
\
tests/ssg-launch-group
\
tests/ssg-join-leave-group
\
tests/perf-regression/margo-p2p-latency
\
tests/perf-regression/margo-p2p-bw
TESTS
+=
\
tests/simple-group.sh
\
tests/simple-group
-mpi
.sh
\
tests/join-leave-group.sh
EXTRA_DIST
+=
\
tests/simple-group.sh
\
tests/simple-group
-mpi
.sh
\
tests/join-leave-group.sh
endif
if
SSG_HAVE_PMIX
check_PROGRAMS
+=
\
tests/ssg-pmix-test
TESTS
+=
\
tests/simple-group-pmix.sh
EXTRA_DIST
+=
\
tests/simple-group-pmix.sh
endif
tests/simple-group.sh
→
tests/simple-group
-mpi
.sh
View file @
1dfa47cd
...
...
@@ -14,7 +14,7 @@ if [ $? -ne 0 ]; then
exit
1
fi
wait
wait
$!
if
[
$?
-ne
0
]
;
then
exit
1
fi
...
...
tests/simple-group-pmix.sh
0 → 100755
View file @
1dfa47cd
#!/bin/bash -x
if
[
-z
$srcdir
]
;
then
echo
srcdir variable not set.
exit
1
fi
source
$srcdir
/tests/test-util.sh
# launch a group and wait for termination
export
SSG_GROUP_LAUNCH_DURATION
=
10
launch_ssg_group_pmix 4 na+sm &
if
[
$?
-ne
0
]
;
then
wait
exit
1
fi
wait
$!
if
[
$?
-ne
0
]
;
then
exit
1
fi
exit
0
tests/ssg-launch-group.c
View file @
1dfa47cd
...
...
@@ -18,6 +18,9 @@
#ifdef SSG_HAVE_MPI
#include <ssg-mpi.h>
#endif
#ifdef SSG_HAVE_PMIX
#include <ssg-pmix.h>
#endif
#define DIE_IF(cond_expr, err_fmt, ...) \
do { \
...
...
@@ -32,7 +35,6 @@ struct group_launch_opts
{
char
*
addr_str
;
char
*
group_mode
;
char
*
group_addr_conf_file
;
int
shutdown_time
;
char
*
gid_file
;
char
*
group_name
;
...
...
@@ -43,8 +45,7 @@ static void usage()
fprintf
(
stderr
,
"Usage: "
"ssg-launch-group [OPTIONS] <ADDR> <MODE> [CONFFILE]
\n
"
"Create and launch group using given Mercury ADDR string and group create MODE (
\"
mpi
\"
or
\"
conf
\"
).
\n
"
"NOTE: A path to an address CONFFILE is required when using
\"
conf
\"
mode.
\n
"
"Create and launch group using given Mercury ADDR string and group create MODE (
\"
mpi
\"
or
\"
pmix
\"
).
\n
"
"
\n
"
"OPTIONS:
\n
"
"
\t
-s <TIME>
\t\t
Time duration (in seconds) to run the group before shutting down
\n
"
...
...
@@ -90,27 +91,29 @@ static void parse_args(int argc, char *argv[], struct group_launch_opts *opts)
opts
->
addr_str
=
argv
[
optind
++
];
opts
->
group_mode
=
argv
[
optind
++
];
if
(
strcmp
(
opts
->
group_mode
,
"
conf
"
)
==
0
)
if
(
strcmp
(
opts
->
group_mode
,
"
mpi
"
)
==
0
)
{
fprintf
(
stderr
,
"Error: configuration file mode not supported currently!
\n
"
);
exit
(
EXIT_FAILURE
);
if
((
argc
-
optind
)
!=
1
)
#ifdef SSG_HAVE_MPI
if
(
optind
!=
argc
)
{
usage
();
exit
(
EXIT_FAILURE
);
}
opts
->
group_addr_conf_file
=
argv
[
optind
++
];
#else
fprintf
(
stderr
,
"Error: MPI support not built in
\n
"
);
exit
(
EXIT_FAILURE
);
#endif
}
else
if
(
strcmp
(
opts
->
group_mode
,
"
mpi
"
)
==
0
)
else
if
(
strcmp
(
opts
->
group_mode
,
"
pmix
"
)
==
0
)
{
#ifdef SSG_HAVE_
MPI
#ifdef SSG_HAVE_
PMIX
if
(
optind
!=
argc
)
{
usage
();
exit
(
EXIT_FAILURE
);
}
#else
fprintf
(
stderr
,
"Error:
MPI
support not built in
\n
"
);
fprintf
(
stderr
,
"Error:
PMIx
support not built in
\n
"
);
exit
(
EXIT_FAILURE
);
#endif
}
...
...
@@ -149,6 +152,15 @@ int main(int argc, char *argv[])
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
mpi_size
);
}
#endif
#ifdef SSG_HAVE_PMIX
pmix_status_t
ret
;
pmix_proc_t
proc
;
if
(
strcmp
(
opts
.
group_mode
,
"pmix"
)
==
0
)
{
ret
=
PMIx_Init
(
&
proc
,
NULL
,
0
);
DIE_IF
(
ret
!=
PMIX_SUCCESS
,
"PMIx_Init"
);
}
#endif
/* init margo */
/* use the main xstream to drive progress & run handlers */
...
...
@@ -160,12 +172,13 @@ int main(int argc, char *argv[])
DIE_IF
(
sret
!=
SSG_SUCCESS
,
"ssg_init"
);
/* XXX do we want to use callback for testing anything about group??? */
if
(
strcmp
(
opts
.
group_mode
,
"conf"
)
==
0
)
g_id
=
ssg_group_create_config
(
opts
.
group_name
,
opts
.
group_addr_conf_file
,
NULL
,
NULL
);
#ifdef SSG_HAVE_MPI
else
if
(
strcmp
(
opts
.
group_mode
,
"mpi"
)
==
0
)
if
(
strcmp
(
opts
.
group_mode
,
"mpi"
)
==
0
)
g_id
=
ssg_group_create_mpi
(
opts
.
group_name
,
MPI_COMM_WORLD
,
NULL
,
NULL
);
#endif
#ifdef SSG_HAVE_PMIX
if
(
strcmp
(
opts
.
group_mode
,
"pmix"
)
==
0
)
g_id
=
ssg_group_create_pmix
(
opts
.
group_name
,
proc
,
NULL
,
NULL
);
#endif
DIE_IF
(
g_id
==
SSG_GROUP_ID_NULL
,
"ssg_group_create"
);
...
...
@@ -194,6 +207,10 @@ int main(int argc, char *argv[])
if
(
strcmp
(
opts
.
group_mode
,
"mpi"
)
==
0
)
MPI_Finalize
();
#endif
#ifdef SSG_HAVE_PMIX
if
(
strcmp
(
opts
.
group_mode
,
"pmix"
)
==
0
)
PMIx_Finalize
(
NULL
,
0
);
#endif
return
0
;
}
tests/test-util.sh
View file @
1dfa47cd
...
...
@@ -7,11 +7,9 @@ if [ -z "$MKTEMP" ]; then
exit
1
fi
function
launch_ssg_group_mpi
()
function
parse_launch_args
()
{
nmembers
=
${
1
:-
4
}
hg_addr
=
${
2
:-
"na+sm"
}
options
=
""
local
options
=
""
# parse known cmdline options out of env
if
[
!
-z
$SSG_GROUP_LAUNCH_NAME
]
;
then
...
...
@@ -24,6 +22,15 @@ function launch_ssg_group_mpi ()
options
=
"
$options
-f
$SSG_GROUP_LAUNCH_GIDFILE
"
fi
echo
$options
}
function
launch_ssg_group_mpi
()
{
nmembers
=
${
1
:-
4
}
hg_addr
=
${
2
:-
"na+sm"
}
options
=
$(
parse_launch_args
)
# launch SSG group given options
mpirun
-np
$nmembers
tests/ssg-launch-group
$options
$hg_addr
mpi
}
...
...
@@ -31,6 +38,8 @@ function launch_ssg_group_mpi ()
function
launch_ssg_group_pmix
()
{
nmembers
=
${
1
:-
4
}
hg_addr
=
${
2
:-
"na+sm"
}
options
=
$(
parse_launch_args
)
prun
-n
$nmembers
tests/ssg-
pmix-test
prun
-n
$nmembers
tests/ssg-
launch-group
$options
$hg_addr
pmix
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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