Commit 98bd1152 authored by Shane Snyder's avatar Shane Snyder

Merge branch 'pmix-bugfixes' into 'master'

Pmix bugfixes

See merge request sds/ssg!8
parents f10e965d f913a774
......@@ -98,12 +98,15 @@ if test "x${check_mpi}" = xauto -o "x${check_mpi}" = xyes ; then
fi
check_pmix_status=fail
AC_SUBST([BOOTSTRAP_PMIX], [])
AC_CHECK_LIB([pmix], [PMIx_Init])
if test "x${check_pmix}" = xauto -o "x${check_pmix}" = xyes ; then
AC_MSG_CHECKING([If PMIx programs can be compiled])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include<pmix.h>]], [[PMIx_Init(NULL, NULL,0);]])],
[AC_DEFINE([SSG_HAVE_PMIX], [1], [Define to 1 if compiled with PMIx support])
AC_MSG_RESULT([yes])
AC_SUBST([BOOTSTRAP_PMIX], [pmix])
check_pmix_status=success],
[AC_MSG_RESULT([no])])
fi
......
......@@ -8,5 +8,6 @@ Description: Scalable Service Groups (SSG) interface for Mercury
Version: 0.3
URL: https://xgitlab.cels.anl.gov/sds/ssg
Requires: margo
Requires.private: @BOOTSTRAP_PMIX@
Libs: -L${libdir} -lssg
Cflags: -I${includedir}
......@@ -1484,7 +1484,22 @@ void ssg_group_id_deserialize(
*group_id_p = SSG_GROUP_ID_INVALID;
*num_addrs = 0;
if (!ssg_rt || !buf || buf_size == 0 || tmp_num_addrs == 0) return;
if (!ssg_rt) {
fprintf(stderr, "SSG: Must initialize SSG first\n");
return;
}
if (!buf) {
fprintf(stderr, "SSG: Cannot deserialize a NULL buffer\n");
return;
}
if (buf_size == 0) {
fprintf(stderr, "SSG: Attempt to deserialize 0 bytes\n");
return;
}
if (tmp_num_addrs == 0) {
fprintf(stderr, "SSG: Requested deserializing 0 addresses\n");
return;
}
/* check to ensure the buffer contains enough data to make a group ID */
min_buf_size = (sizeof(magic_nr) + sizeof(g_desc->g_id) + sizeof(num_addrs_buf) + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment