Commit a8bfd5c0 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r6970] Bug fix for PMI barrier when dynamic processes are used. The barrier

count needs to be per process group, not global.
parent 821b74fb
......@@ -244,6 +244,7 @@ struct HYD_pg {
int pgid;
struct HYD_proxy *proxy_list;
int pg_process_count;
int barrier_count;
struct HYD_pg *spawner_pg;
......
......@@ -53,7 +53,6 @@ static HYD_status fn_barrier_in(int fd, int pid, int pgid, char *args[])
struct HYD_proxy *proxy, *tproxy;
const char *cmd;
int proxy_count;
static int barrier_count = 0;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
......@@ -65,9 +64,9 @@ static HYD_status fn_barrier_in(int fd, int pid, int pgid, char *args[])
for (tproxy = proxy->pg->proxy_list; tproxy; tproxy = tproxy->next)
proxy_count++;
barrier_count++;
if (barrier_count == proxy_count) {
barrier_count = 0;
proxy->pg->barrier_count++;
if (proxy->pg->barrier_count == proxy_count) {
proxy->pg->barrier_count = 0;
cmd = "cmd=barrier_out\n";
for (tproxy = proxy->pg->proxy_list; tproxy; tproxy = tproxy->next) {
......
......@@ -85,6 +85,7 @@ void HYDU_init_pg(struct HYD_pg *pg, int pgid)
pg->pgid = pgid;
pg->proxy_list = NULL;
pg->pg_process_count = 0;
pg->barrier_count = 0;
pg->spawner_pg = NULL;
pg->pg_scratch = NULL;
pg->next = NULL;
......
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