[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-289-g5ebed03
mysql vizuser
noreply at mpich.org
Sat Jun 8 23:15:44 CDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 5ebed0363a14a822eb7c8aa48678386df314d526 (commit)
via 1564681401cee51a0ffc11961f91542dd74c2de6 (commit)
via 10fe9459add3c4a5a83a260b7e1ad86d8e69b2fb (commit)
from 2c8dbec59a75cb3cb4503f1e579137895f286067 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/5ebed0363a14a822eb7c8aa48678386df314d526
commit 5ebed0363a14a822eb7c8aa48678386df314d526
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sat Jun 8 23:02:11 2013 -0500
Squash memory leaks in the slurm code.
diff --git a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
index 652c5b0..4479ce0 100644
--- a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
+++ b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
@@ -14,19 +14,14 @@ static struct HYD_node *global_node_list = NULL;
static HYD_status group_to_nodes(char *str)
{
- char *pre, *nodes, *tnodes, *tmp, *start_str, *end_str, **set;
+ char *nodes, *tnodes, *tmp, *start_str, *end_str, **set;
int start, end, i, j, k = 0;
- struct HYD_node *node;
HYD_status status = HYD_SUCCESS;
- pre = HYDU_strdup(str);
- for (tmp = pre; *tmp != '[' && *tmp != 0; tmp++);
+ for (tmp = str; *tmp != '[' && *tmp != 0; tmp++);
if (*tmp == 0) { /* only one node in the group */
- status = HYDU_alloc_node(&node);
- HYDU_ERR_POP(status, "unable to allocate note\n");
-
- status = HYDU_add_to_node_list(pre, tasks_per_node[k++], &global_node_list);
+ status = HYDU_add_to_node_list(str, tasks_per_node[k++], &global_node_list);
HYDU_ERR_POP(status, "unable to add to node list\n");
goto fn_exit;
@@ -63,7 +58,7 @@ static HYD_status group_to_nodes(char *str)
for (j = start; j <= end; j++) {
char *node_str[HYD_NUM_TMP_STRINGS];
- node_str[0] = HYDU_strdup(pre);
+ node_str[0] = HYDU_strdup(str);
node_str[1] = HYDU_int_to_str_pad(j, strlen(start_str));
node_str[2] = NULL;
@@ -133,9 +128,9 @@ static HYD_status list_to_groups(char *str)
static HYD_status extract_tasks_per_node(int nnodes, char *task_list)
{
- char *task_set, **tmp_core_list;
+ char *task_set, **tmp_core_list = NULL;
char *nodes, *cores;
- int i, j, k, p, count;
+ int i, j, k, p, count = 0;
HYD_status status = HYD_SUCCESS;
HYDU_MALLOC(tasks_per_node, int *, nnodes * sizeof(int), status);
@@ -168,6 +163,9 @@ static HYD_status extract_tasks_per_node(int nnodes, char *task_list)
}
fn_exit:
+ for (i = 0; i < count; i++)
+ HYDU_FREE(tmp_core_list[i]);
+ HYDU_FREE(tmp_core_list);
return status;
fn_fail:
@@ -197,7 +195,6 @@ HYD_status HYDT_bscd_slurm_query_node_list(struct HYD_node **node_list)
*node_list = NULL;
goto fn_exit;
}
- task_list = HYDU_strdup(task_list);
status = extract_tasks_per_node(nnodes, task_list);
HYDU_ERR_POP(status, "unable to extract the number of tasks per node\n");
@@ -206,6 +203,7 @@ HYD_status HYDT_bscd_slurm_query_node_list(struct HYD_node **node_list)
*node_list = global_node_list;
fn_exit:
+ HYDU_FREE(tasks_per_node);
HYDU_FUNC_EXIT();
return status;
http://git.mpich.org/mpich.git/commitdiff/1564681401cee51a0ffc11961f91542dd74c2de6
commit 1564681401cee51a0ffc11961f91542dd74c2de6
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sat Jun 8 22:57:18 2013 -0500
Fix the slurm node query code when only one node is allocated.
diff --git a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
index 61f1536..652c5b0 100644
--- a/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
+++ b/src/pm/hydra/tools/bootstrap/external/slurm_query_node_list.c
@@ -16,7 +16,7 @@ static HYD_status group_to_nodes(char *str)
{
char *pre, *nodes, *tnodes, *tmp, *start_str, *end_str, **set;
int start, end, i, j, k = 0;
- struct HYD_node *node, *tnode;
+ struct HYD_node *node;
HYD_status status = HYD_SUCCESS;
pre = HYDU_strdup(str);
@@ -26,15 +26,8 @@ static HYD_status group_to_nodes(char *str)
status = HYDU_alloc_node(&node);
HYDU_ERR_POP(status, "unable to allocate note\n");
- node->hostname = HYDU_strdup(pre);
- node->core_count = tasks_per_node[k++];
-
- if (global_node_list == NULL)
- global_node_list = node;
- else {
- for (tnode = global_node_list; tnode->next; tnode = tnode->next);
- tnode->next = node;
- }
+ status = HYDU_add_to_node_list(pre, tasks_per_node[k++], &global_node_list);
+ HYDU_ERR_POP(status, "unable to add to node list\n");
goto fn_exit;
}
@@ -79,8 +72,7 @@ static HYD_status group_to_nodes(char *str)
HYDU_free_strlist(node_str);
- status =
- HYDU_add_to_node_list(HYDU_strdup(tmp), tasks_per_node[k++], &global_node_list);
+ status = HYDU_add_to_node_list(tmp, tasks_per_node[k++], &global_node_list);
HYDU_ERR_POP(status, "unable to add to node list\n");
}
}
http://git.mpich.org/mpich.git/commitdiff/10fe9459add3c4a5a83a260b7e1ad86d8e69b2fb
commit 10fe9459add3c4a5a83a260b7e1ad86d8e69b2fb
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sat Jun 8 22:50:52 2013 -0500
Fix error in SLURM environment detection.
diff --git a/src/pm/hydra/tools/bootstrap/external/slurm_query_native_int.c b/src/pm/hydra/tools/bootstrap/external/slurm_query_native_int.c
index a29ec57..6814e4c 100644
--- a/src/pm/hydra/tools/bootstrap/external/slurm_query_native_int.c
+++ b/src/pm/hydra/tools/bootstrap/external/slurm_query_native_int.c
@@ -22,8 +22,6 @@ HYD_status HYDT_bscd_slurm_query_native_int(int *ret)
*ret = 0;
if (!HYDTI_bscd_env_is_avail("SLURM_TASKS_PER_NODE"))
*ret = 0;
- if (!HYDTI_bscd_env_is_avail("SLURM_NODEID"))
- *ret = 0;
fn_exit:
HYDU_FUNC_EXIT();
-----------------------------------------------------------------------
Summary of changes:
.../bootstrap/external/slurm_query_native_int.c | 2 -
.../bootstrap/external/slurm_query_node_list.c | 34 +++++++-------------
2 files changed, 12 insertions(+), 24 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list