Skip to content

Commit

Permalink
Updating Distributed keyval for SSG changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brobey committed Dec 11, 2019
1 parent 896356f commit 756246d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ spack install --dirty ch-placement
# Refresh spack environment.
source spack/share/spack/setup-env.sh
# Load required modules.
source <(spack module loads --dependencies sdskeyval ssg ch-placement)
#spack load -r autoconf
#spack load -r automake
#spack load -r libtool
source <(spack module tcl loads --dependencies sdskeyval ssg ch-placement autoconf automake libtool)
```

### Get and build sdsdkv.

```
git clone https://xgitlab.cels.anl.gov/sds/sdsdkv.git
cd sdsdkv && ./autogen && ./configure CXX=mpic++ && make
cd sdsdkv && autoreconf --force --install && ./configure CXX=mpic++ && make
```
6 changes: 3 additions & 3 deletions src/sdsdkv-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct sdsdkv_client : public personality {
int rc = ssg_init(m_mid);
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
//
rc = ssg_group_attach(m_gid);
rc = ssg_group_observe(m_gid);
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
//
return SDSDKV_SUCCESS;
Expand All @@ -80,7 +80,7 @@ struct sdsdkv_client : public personality {
hg_size_t gsize = ssg_get_group_size(m_gid);
//
for (decltype(gsize) i = 0; i < gsize; ++i) {
hg_addr_t server_addr = ssg_get_addr(m_gid, i);
hg_addr_t server_addr = ssg_get_group_member_addr(m_gid, i);
if (server_addr == HG_ADDR_NULL) return SDSDKV_ERR_SERVICE;
m_server_addrs.push_back(server_addr);
//
Expand Down Expand Up @@ -211,7 +211,7 @@ struct sdsdkv_client : public personality {
}
sdskv_client_finalize(m_kvcl);
//
rc = ssg_group_detach(m_gid);
rc = ssg_group_unobserve(m_gid);
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
rc = ssg_group_destroy(m_gid);
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
Expand Down
2 changes: 1 addition & 1 deletion src/sdsdkv-personality.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class personality {
: m_mpi(nullptr)
, m_config(nullptr)
, m_mid(MARGO_INSTANCE_NULL)
, m_gid(SSG_GROUP_ID_NULL) { }
, m_gid(SSG_GROUP_ID_INVALID) { }
//
virtual
~personality(void)
Expand Down
2 changes: 1 addition & 1 deletion src/sdsdkv-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct sdsdkv_server : public personality {
&group_update_cb,
&world_id
);
if (m_gid == SSG_GROUP_ID_NULL) return SDSDKV_ERR_SERVICE;
if (m_gid == SSG_GROUP_ID_INVALID) return SDSDKV_ERR_SERVICE;
//
return SDSDKV_SUCCESS;
}
Expand Down

0 comments on commit 756246d

Please sign in to comment.