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
b39e1324
Commit
b39e1324
authored
Oct 28, 2024
by
iker_martin
Browse files
Minor bugfix por spawned processes. Changes in the Debug prints
parent
f2a58467
Changes
4
Show whitespace changes
Inline
Side-by-side
Codes/MaM/MAM_DataStructures.c
View file @
b39e1324
...
...
@@ -57,8 +57,8 @@ void MAM_Comm_main_structures(MPI_Comm comm, int rootBcast) {
MPI_Bcast
(
MPI_BOTTOM
,
1
,
mall
->
struct_type
,
rootBcast
,
comm
);
if
(
mall
->
nodelist
==
NULL
)
{
mall
->
nodelist
=
c
alloc
(
mall
->
nodelist_len
+
1
,
sizeof
(
char
));
mall
->
nodelist
[
mall
->
nodelist_len
]
=
'\0'
;
mall
->
nodelist
=
m
alloc
(
(
mall
->
nodelist_len
)
*
sizeof
(
char
));
mall
->
nodelist
[
mall
->
nodelist_len
-
1
]
=
'\0'
;
}
MPI_Bcast
(
mall
->
nodelist
,
mall
->
nodelist_len
,
MPI_CHAR
,
rootBcast
,
comm
);
}
...
...
Codes/MaM/MAM_RMS.c
View file @
b39e1324
...
...
@@ -24,6 +24,9 @@ void MAM_check_hosts() {
#if MAM_USE_SLURM
not_filled
=
MAM_I_slurm_getjob_hosts_info
();
if
(
not_filled
)
{
#if MAM_DEBUG >= 2
DEBUG_FUNC
(
"WARNING - RMS info retriever failed with slurm functions. Trying with ENV variables"
,
mall
->
myId
,
mall
->
numP
);
#endif
if
(
mall
->
nodelist
!=
NULL
)
{
free
(
mall
->
nodelist
);
mall
->
nodelist
=
NULL
;
...
...
@@ -276,7 +279,7 @@ int MAM_I_slurm_getjob_hosts_info() {
if
(
tmp
==
NULL
)
return
1
;
jobId
=
atoi
(
tmp
);
err
=
slurm_load_job
(
&
j_info
,
jobId
,
1
);
err
=
slurm_load_job
(
&
j_info
,
jobId
,
1
);
// FIXME Valgrind Not freed
if
(
err
)
return
err
;
last_record
=
j_info
->
job_array
[
j_info
->
record_count
-
1
];
...
...
Codes/MaM/MAM_Times.c
View file @
b39e1324
...
...
@@ -4,7 +4,7 @@
void
def_malleability_times
(
MPI_Datatype
*
new_type
);
void
init_malleability_times
()
{
#if MAM_DEBUG
#if MAM_DEBUG
>= 4
DEBUG_FUNC
(
"Initializing recording structure"
,
mall
->
myId
,
mall
->
numP
);
fflush
(
stdout
);
MPI_Barrier
(
mall
->
comm
);
#endif
...
...
@@ -17,7 +17,7 @@ void init_malleability_times() {
reset_malleability_times
();
def_malleability_times
(
&
mall_conf
->
times
->
times_type
);
#if MAM_DEBUG
#if MAM_DEBUG
>= 4
DEBUG_FUNC
(
"Initialized recording structure"
,
mall
->
myId
,
mall
->
numP
);
fflush
(
stdout
);
MPI_Barrier
(
mall
->
comm
);
#endif
}
...
...
@@ -31,7 +31,7 @@ void reset_malleability_times() {
}
void
free_malleability_times
()
{
#if MAM_DEBUG
#if MAM_DEBUG
>= 4
DEBUG_FUNC
(
"Freeing recording structure"
,
mall
->
myId
,
mall
->
numP
);
fflush
(
stdout
);
#endif
if
(
mall_conf
->
times
!=
NULL
)
{
...
...
@@ -41,7 +41,7 @@ void free_malleability_times() {
}
free
(
mall_conf
->
times
);
}
#if MAM_DEBUG
#if MAM_DEBUG
>= 4
DEBUG_FUNC
(
"Freed recording structure"
,
mall
->
myId
,
mall
->
numP
);
fflush
(
stdout
);
#endif
}
...
...
@@ -52,6 +52,8 @@ void free_malleability_times() {
* 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.
*
* Null values can be passed if there is no interest in retreiving particular times
*
* 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.
...
...
@@ -61,11 +63,11 @@ void free_malleability_times() {
*/
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
;
*
asy_time
=
times
->
async_end
-
times
->
async_start
;
*
user_time
=
times
->
user_end
-
times
->
user_start
;
*
mall_time
=
times
->
malleability_end
-
times
->
malleability_start
;
if
(
sp_time
!=
NULL
)
*
sp_time
=
times
->
spawn_time
;
if
(
sy_time
!=
NULL
)
*
sy_time
=
times
->
sync_end
-
times
->
sync_start
;
if
(
asy_time
!=
NULL
)
*
asy_time
=
times
->
async_end
-
times
->
async_start
;
if
(
user_time
!=
NULL
)
*
user_time
=
times
->
user_end
-
times
->
user_start
;
if
(
mall_time
!=
NULL
)
*
mall_time
=
times
->
malleability_end
-
times
->
malleability_start
;
}
void
malleability_times_broadcast
(
int
root
)
{
...
...
Codes/MaM/spawn_methods/ProcessDist.c
View file @
b39e1324
...
...
@@ -11,9 +11,9 @@
#include "../MAM_DataStructures.h"
//--------------PRIVATE CONSTANTS------------------//
#define MAM_HOSTFILE_NAME1 "MAM_HF_ID" // Constant size name (
15)
#define MAM_HOSTFILE_NAME2 "_S" // Constant size name (2)
#define MAM_HOSTFILE_NAME3 ".tmp" // Constant size name (4)
#define MAM_HOSTFILE_NAME1 "MAM_HF_ID" // Constant size name (
9) -- Part of SIZE1
#define MAM_HOSTFILE_NAME2 "_S" // Constant size name (2)
-- Part of SIZE1
#define MAM_HOSTFILE_NAME3 ".tmp" // Constant size name (4)
-- Part of SIZE2
#define MAM_HOSTFILE_SIZE1 15 // 11 Chars + 4 Digits
#define MAM_HOSTFILE_SIZE2 8 // 4 Chars + 3 Digits + \0
#define MAM_HOSTFILE_SIZE MAM_HOSTFILE_SIZE1 + MAM_HOSTFILE_SIZE2 //23 = 15 Chars + 7 Digits + \0
...
...
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