Commit e094a77d authored by iker_martin's avatar iker_martin
Browse files

Hotfix Dynamical process spawning error when setting mapping without Slurm...

Hotfix Dynamical process spawning error when setting mapping without Slurm installation. Previously was not being considered if the machine could be called another thing than localhost for that specific installation
parent 610d94e2
...@@ -212,13 +212,17 @@ void compact_dist(struct physical_dist dist, int *used_nodes, int *procs) { ...@@ -212,13 +212,17 @@ void compact_dist(struct physical_dist dist, int *used_nodes, int *procs) {
* nodos, pero es necesario activar Slurm. * nodos, pero es necesario activar Slurm.
*/ */
void generate_info_string(int target_qty, MPI_Info *info){ void generate_info_string(int target_qty, MPI_Info *info){
char *host_string, host[9] = "localhost"; char *host_string, *host;
int len;
host = malloc(MPI_MAX_PROCESSOR_NAME * sizeof(char));
MPI_Get_processor_name(host, &len);
// CREATE AND SET STRING HOSTS // CREATE AND SET STRING HOSTS
write_str_node(&host_string, 0, target_qty, host); write_str_node(&host_string, 0, target_qty, host);
// SET MAPPING // SET MAPPING
MPI_Info_create(info); MPI_Info_create(info);
MPI_Info_set(*info, "hosts", host_string); MPI_Info_set(*info, "hosts", host_string);
free(host);
free(host_string); free(host_string);
} }
......
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