Commit 6ff12d05 authored by iker_martin's avatar iker_martin
Browse files

Modified location of function MAM_Retrieve_times

parent ee51c620
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
#include "MAM_Constants.h" #include "MAM_Constants.h"
#include "MAM_Manager.h" #include "MAM_Manager.h"
#include "MAM_Configuration.h" #include "MAM_Configuration.h"
#include "MAM_Times_retrieve.h"
#endif #endif
...@@ -456,23 +456,6 @@ int MAM_Get_Reconf_Info(mam_user_reconf_t *reconf_info) { ...@@ -456,23 +456,6 @@ int MAM_Get_Reconf_Info(mam_user_reconf_t *reconf_info) {
return MAM_OK; return MAM_OK;
} }
/*
* @brief Returns the times used for the different steps of last reconfiguration.
*
* This function is intended to be called when a reconfiguration has ended.
* It is designed to provide the necessary information for the user to perform data redistribution.
*
* Parameters:
* - double *sp_time: A pointer where the spawn time will be saved.
* - double *sy_time: A pointer where the sychronous data redistribution time will be saved.
* - double *asy_time: A pointer where the asychronous data redistribution time will be saved.
* - double *user_time: A pointer where the user data redistribution time will be saved.
* - double *mall_time: A pointer where the malleability time will be saved.
*/
void MAM_Retrieve_times(double *sp_time, double *sy_time, double *asy_time, double *user_time, double *mall_time) {
MAM_I_retrieve_times(sp_time, sy_time, asy_time, user_time, mall_time);
}
//======================================================|| //======================================================||
//================PRIVATE FUNCTIONS=====================|| //================PRIVATE FUNCTIONS=====================||
//================DATA COMMUNICATION====================|| //================DATA COMMUNICATION====================||
......
...@@ -26,7 +26,4 @@ void MAM_Data_add(void *data, size_t *index, size_t total_qty, MPI_Datatype type ...@@ -26,7 +26,4 @@ void MAM_Data_add(void *data, size_t *index, size_t total_qty, MPI_Datatype type
void MAM_Data_modify(void *data, size_t index, size_t total_qty, MPI_Datatype type, int is_replicated, int is_constant); void MAM_Data_modify(void *data, size_t index, size_t total_qty, MPI_Datatype type, int is_replicated, int is_constant);
void MAM_Data_get_entries(int is_replicated, int is_constant, size_t *entries); void MAM_Data_get_entries(int is_replicated, int is_constant, size_t *entries);
void MAM_Data_get_pointer(void **data, size_t index, size_t *total_qty, MPI_Datatype *type, int is_replicated, int is_constant); void MAM_Data_get_pointer(void **data, size_t index, size_t *total_qty, MPI_Datatype *type, int is_replicated, int is_constant);
void MAM_Retrieve_times(double *sp_time, double *sy_time, double *asy_time, double *user_time, double *mall_time);
#endif #endif
...@@ -46,11 +46,20 @@ void free_malleability_times() { ...@@ -46,11 +46,20 @@ void free_malleability_times() {
#endif #endif
} }
void malleability_times_broadcast(int root) { /*
MPI_Bcast(mall_conf->times, 1, mall_conf->times->times_type, root, mall->intercomm); * @brief Returns the times used for the different steps of last reconfiguration.
} *
* This function is intended to be called when a reconfiguration has ended.
void MAM_I_retrieve_times(double *sp_time, double *sy_time, double *asy_time, double *user_time, double *mall_time) { * It is designed to provide the necessary information for the user to perform data redistribution.
*
* Parameters:
* - double *sp_time: A pointer where the spawn time will be saved.
* - double *sy_time: A pointer where the sychronous data redistribution time will be saved.
* - double *asy_time: A pointer where the asychronous data redistribution time will be saved.
* - double *user_time: A pointer where the user data redistribution time will be saved.
* - double *mall_time: A pointer where the malleability time will be saved.
*/
void MAM_Retrieve_times(double *sp_time, double *sy_time, double *asy_time, double *user_time, double *mall_time) {
malleability_times_t *times = mall_conf->times; malleability_times_t *times = mall_conf->times;
*sp_time = times->spawn_time; *sp_time = times->spawn_time;
*sy_time = times->sync_end - times->sync_start; *sy_time = times->sync_end - times->sync_start;
...@@ -59,6 +68,10 @@ void MAM_I_retrieve_times(double *sp_time, double *sy_time, double *asy_time, do ...@@ -59,6 +68,10 @@ void MAM_I_retrieve_times(double *sp_time, double *sy_time, double *asy_time, do
*mall_time = times->malleability_end - times->malleability_start; *mall_time = times->malleability_end - times->malleability_start;
} }
void malleability_times_broadcast(int root) {
MPI_Bcast(mall_conf->times, 1, mall_conf->times->times_type, root, mall->intercomm);
}
void def_malleability_times(MPI_Datatype *new_type) { void def_malleability_times(MPI_Datatype *new_type) {
int i, counts = 5; int i, counts = 5;
int blocklengths[counts]; int blocklengths[counts];
......
#ifndef MAM_TIMES_RETRIEVE_H
#define MAM_TIMES_RETRIEVE_H
void MAM_Retrieve_times(double *sp_time, double *sy_time, double *asy_time, double *user_time, double *mall_time);
#endif
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