Commit 878a294b authored by iker_martin's avatar iker_martin
Browse files

Fixed a memory issue related to communicating the results structure. A...

Fixed a memory issue related to communicating the results structure. A refactor is needed to send the structure as is expected. Minor bugfixes in Main.c
parent 6d09d376
......@@ -48,7 +48,8 @@ void def_results_type(results_data *results, int resizes, MPI_Datatype *results_
// Rellenar vector types
types[0] = types[1] = types[2] = types[3] = types[4] = types[5] = MPI_DOUBLE;
blocklengths[3] = blocklengths[4] = resizes;
//blocklengths[3] = blocklengths[4] = resizes;
blocklengths[3] = blocklengths[4] = 1;
// Rellenar vector displs
MPI_Get_address(results, &dir);
......
......@@ -100,6 +100,10 @@ int main(int argc, char *argv[]) {
//
group->grp = group->grp - 1; // TODO REFACTOR???
do {
get_malleability_user_comm(&comm);
MPI_Comm_size(comm, &(group->numP));
MPI_Comm_rank(comm, &(group->myId));
group->grp = group->grp + 1;
set_benchmark_grp(group->grp);
if(group->grp != 0) {
......@@ -119,18 +123,13 @@ int main(int argc, char *argv[]) {
res = work();
if(res == MALL_ZOMBIE) break;
get_malleability_user_comm(&comm);
MPI_Comm_size(comm, &(group->numP));
MPI_Comm_rank(comm, &(group->myId));
if(res==1) { // Se ha llegado al final de la aplicacion
MPI_Barrier(comm); // TODO Posible error al utilizar SHRINK
results->exec_time = MPI_Wtime() - results->exec_start - results->wasted_time;
}
print_local_results();
reset_results_index(results);
} while(config_file->n_resizes > group->grp + 1 && config_file->groups[group->grp].sm == MALL_SPAWN_MERGE);
} while(config_file->n_resizes > group->grp + 1 && config_file->groups[group->grp+1].sm == MALL_SPAWN_MERGE);
//
// TERMINA LA EJECUCION ----------------------------------------------------------
......
......@@ -534,8 +534,7 @@ void Children_init() {
MPI_Comm_dup(mall->intercomm, &(mall->thread_comm));
MPI_Comm_dup(mall->intercomm, &(mall->comm));
MPI_Comm_dup(mall->intercomm, &(mall->user_comm));
MPI_Comm_dup(mall->intercomm, &(mall->user_comm));
}
MPI_Comm_disconnect(&(mall->intercomm));
......
......@@ -65,7 +65,6 @@ int init_spawn(char *argv, int num_cpus, int num_nodes, char *nodelist, int myId
if (local_state == MALL_SPAWN_COMPLETED)
deallocate_spawn_data();
} else {
local_state = spawn_data->spawn_is_single ?
MALL_SPAWN_SINGLE_PENDING : MALL_SPAWN_PENDING;
......
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