A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
plug two memleaks
[simgrid.git]
/
src
/
simix
/
smx_global.cpp
diff --git
a/src/simix/smx_global.cpp
b/src/simix/smx_global.cpp
index
27dea37
..
dfcf0ba
100644
(file)
--- a/
src/simix/smx_global.cpp
+++ b/
src/simix/smx_global.cpp
@@
-268,7
+268,7
@@
void SIMIX_clean()
#if HAVE_SMPI
if (SIMIX_process_count()>0){
#if HAVE_SMPI
if (SIMIX_process_count()>0){
- if(smpi_process
_
initialized()){
+ if(smpi_process
()->
initialized()){
xbt_die("Process exited without calling MPI_Finalize - Killing simulation");
}else{
XBT_WARN("Process called exit when leaving - Skipping cleanups");
xbt_die("Process exited without calling MPI_Finalize - Killing simulation");
}else{
XBT_WARN("Process called exit when leaving - Skipping cleanups");
@@
-302,6
+302,9
@@
void SIMIX_clean()
xbt_os_mutex_destroy(simix_global->mutex);
simix_global->mutex = nullptr;
xbt_os_mutex_destroy(simix_global->mutex);
simix_global->mutex = nullptr;
+#if HAVE_MC
+ xbt_dynar_free(&simix_global->actors_vector);
+#endif
/* Let's free maestro now */
delete simix_global->maestro_process->context;
/* Let's free maestro now */
delete simix_global->maestro_process->context;
@@
-693,5
+696,6
@@
void SIMIX_display_process_status()
int SIMIX_is_maestro()
{
int SIMIX_is_maestro()
{
- return simix_global==nullptr /*SimDag*/|| SIMIX_process_self() == simix_global->maestro_process;
+ smx_actor_t self = SIMIX_process_self();
+ return simix_global == nullptr /*SimDag*/ || self == nullptr || self == simix_global->maestro_process;
}
}