Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
6ff12d05
Commit
6ff12d05
authored
Jun 06, 2024
by
iker_martin
Browse files
Modified location of function MAM_Retrieve_times
parent
ee51c620
Changes
5
Show whitespace changes
Inline
Side-by-side
Codes/malleability/MAM.h
View file @
6ff12d05
...
...
@@ -4,5 +4,6 @@
#include "MAM_Constants.h"
#include "MAM_Manager.h"
#include "MAM_Configuration.h"
#include "MAM_Times_retrieve.h"
#endif
Codes/malleability/MAM_Manager.c
View file @
6ff12d05
...
...
@@ -456,23 +456,6 @@ int MAM_Get_Reconf_Info(mam_user_reconf_t *reconf_info) {
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=====================||
//================DATA COMMUNICATION====================||
...
...
Codes/malleability/MAM_Manager.h
View file @
6ff12d05
...
...
@@ -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_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_Retrieve_times
(
double
*
sp_time
,
double
*
sy_time
,
double
*
asy_time
,
double
*
user_time
,
double
*
mall_time
);
#endif
Codes/malleability/MAM_Times.c
View file @
6ff12d05
...
...
@@ -46,11 +46,20 @@ void free_malleability_times() {
#endif
}
void
malleability_times_broadcast
(
int
root
)
{
MPI_Bcast
(
mall_conf
->
times
,
1
,
mall_conf
->
times
->
times_type
,
root
,
mall
->
intercomm
);
}
void
MAM_I_retrieve_times
(
double
*
sp_time
,
double
*
sy_time
,
double
*
asy_time
,
double
*
user_time
,
double
*
mall_time
)
{
/*
* @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
)
{
malleability_times_t
*
times
=
mall_conf
->
times
;
*
sp_time
=
times
->
spawn_time
;
*
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
*
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
)
{
int
i
,
counts
=
5
;
int
blocklengths
[
counts
];
...
...
Codes/malleability/MAM_Times_retrieve.h
0 → 100644
View file @
6ff12d05
#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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment