Commit 00759da4 authored by iker_martin's avatar iker_martin
Browse files

Fixed error when allocating memory for executable names during spawn

parent 7a64506d
......@@ -14,7 +14,7 @@
void node_dist(Spawn_data spawn_data, int **qty, int *used_nodes, int *total_spawns);
void spread_dist(Spawn_data spawn_data, int *used_nodes, int *procs);
void compact_dist(Spawn_data spawn_data, int *used_nodes, int *procs);
void set_spawn_cmd(size_t nodes, Spawn_data *spawn_data);
void set_spawn_cmd(Spawn_data *spawn_data);
void generate_info_string(char *nodelist, int *procs_array, size_t nodes, Spawn_data *spawn_data);
void generate_multiple_info_string(char *nodelist, int *procs_array, size_t nodes, Spawn_data *spawn_data);
......@@ -73,7 +73,7 @@ void processes_dist(Spawn_data *spawn_data) {
generate_info_string(mall->nodelist, procs_array, used_nodes, spawn_data);
}
#endif
set_spawn_cmd(used_nodes, spawn_data);
set_spawn_cmd(spawn_data);
free(procs_array);
}
......@@ -201,8 +201,8 @@ void compact_dist(Spawn_data spawn_data, int *used_nodes, int *procs) {
* comando.
*
*/
void set_spawn_cmd(size_t nodes, Spawn_data *spawn_data) {
size_t index = 0;
void set_spawn_cmd(Spawn_data *spawn_data) {
int index = 0;
char *cmd_aux;
switch(mall_conf->external_usage) {
case MAM_USE_VALGRIND:
......@@ -216,7 +216,7 @@ void set_spawn_cmd(size_t nodes, Spawn_data *spawn_data) {
break;
}
for(; index<nodes; index++) {
for(; index<spawn_data->total_spawns; index++) {
spawn_data->sets[index].cmd = cmd_aux;
}
}
......
Supports Markdown
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