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
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git]
/
src
/
smpi
/
smpi_global.cpp
diff --git
a/src/smpi/smpi_global.cpp
b/src/smpi/smpi_global.cpp
index
c774443
..
7f6c52c
100644
(file)
--- a/
src/smpi/smpi_global.cpp
+++ b/
src/smpi/smpi_global.cpp
@@
-376,12
+376,12
@@
void smpi_comm_null_copy_buffer_callback(smx_synchro_t comm, void *buff, size_t
static void smpi_check_options(){
//check correctness of MPI parameters
static void smpi_check_options(){
//check correctness of MPI parameters
- xbt_assert(xbt_cfg_get_int("smpi/async
_small_thresh") <= xbt_cfg_get_int("smpi/send_is_detached_
thresh"));
+ xbt_assert(xbt_cfg_get_int("smpi/async
-small-thresh") <= xbt_cfg_get_int("smpi/send-is-detached-
thresh"));
- if (xbt_cfg_is_default_value("smpi/running
_
power")) {
+ if (xbt_cfg_is_default_value("smpi/running
-
power")) {
XBT_INFO("You did not set the power of the host running the simulation. "
"The timings will certainly not be accurate. "
XBT_INFO("You did not set the power of the host running the simulation. "
"The timings will certainly not be accurate. "
- "Use the option \"--cfg=smpi/running
_
power:<flops>\" to set its value."
+ "Use the option \"--cfg=smpi/running
-
power:<flops>\" to set its value."
"Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.");
}
}
"Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.");
}
}
@@
-448,30
+448,32
@@
void smpi_global_destroy(void)
smpi_bench_destroy();
if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
while (smpi_group_unuse(smpi_comm_group(MPI_COMM_WORLD)) > 0);
smpi_bench_destroy();
if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
while (smpi_group_unuse(smpi_comm_group(MPI_COMM_WORLD)) > 0);
- xbt_free(MPI_COMM_WORLD);
xbt_barrier_destroy(process_data[0]->finalization_barrier);
}else{
smpi_deployment_cleanup_instances();
}
xbt_barrier_destroy(process_data[0]->finalization_barrier);
}else{
smpi_deployment_cleanup_instances();
}
- MPI_COMM_WORLD = MPI_COMM_NULL;
for (i = 0; i < count; i++) {
if(process_data[i]->comm_self!=MPI_COMM_NULL){
for (i = 0; i < count; i++) {
if(process_data[i]->comm_self!=MPI_COMM_NULL){
- smpi_group_unuse(smpi_comm_group(process_data[i]->comm_self));
smpi_comm_destroy(process_data[i]->comm_self);
}
if(process_data[i]->comm_intra!=MPI_COMM_NULL){
smpi_comm_destroy(process_data[i]->comm_self);
}
if(process_data[i]->comm_intra!=MPI_COMM_NULL){
- smpi_group_unuse(smpi_comm_group(process_data[i]->comm_intra));
smpi_comm_destroy(process_data[i]->comm_intra);
}
xbt_os_timer_free(process_data[i]->timer);
smpi_comm_destroy(process_data[i]->comm_intra);
}
xbt_os_timer_free(process_data[i]->timer);
- simcall_mbox_destroy(process_data[i]->mailbox);
- simcall_mbox_destroy(process_data[i]->mailbox_small);
xbt_mutex_destroy(process_data[i]->mailboxes_mutex);
xbt_free(process_data[i]);
}
xbt_free(process_data);
process_data = NULL;
xbt_mutex_destroy(process_data[i]->mailboxes_mutex);
xbt_free(process_data[i]);
}
xbt_free(process_data);
process_data = NULL;
+ if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
+ smpi_comm_cleanup_smp(MPI_COMM_WORLD);
+ smpi_comm_cleanup_attributes(MPI_COMM_WORLD);
+ xbt_free(MPI_COMM_WORLD);
+ }
+
+ MPI_COMM_WORLD = MPI_COMM_NULL;
+
xbt_free(index_to_process_data);
if(smpi_privatize_global_variables)
smpi_destroy_global_memory_segments();
xbt_free(index_to_process_data);
if(smpi_privatize_global_variables)
smpi_destroy_global_memory_segments();
@@
-575,9
+577,9
@@
static void smpi_init_options(){
int barrier_id = find_coll_description(mpi_coll_barrier_description, xbt_cfg_get_string("smpi/barrier"),"barrier");
mpi_coll_barrier_fun = (int (*)(MPI_Comm comm)) mpi_coll_barrier_description[barrier_id].coll;
int barrier_id = find_coll_description(mpi_coll_barrier_description, xbt_cfg_get_string("smpi/barrier"),"barrier");
mpi_coll_barrier_fun = (int (*)(MPI_Comm comm)) mpi_coll_barrier_description[barrier_id].coll;
- smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu
_
threshold");
- smpi_running_power = xbt_cfg_get_double("smpi/running
_
power");
- smpi_privatize_global_variables = xbt_cfg_get_boolean("smpi/privatize
_global_
variables");
+ smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu
-
threshold");
+ smpi_running_power = xbt_cfg_get_double("smpi/running
-
power");
+ smpi_privatize_global_variables = xbt_cfg_get_boolean("smpi/privatize
-global-
variables");
if (smpi_cpu_threshold < 0)
smpi_cpu_threshold = DBL_MAX;
}
if (smpi_cpu_threshold < 0)
smpi_cpu_threshold = DBL_MAX;
}
@@
-628,7
+630,7
@@
int smpi_main(int (*realmain) (int argc, char *argv[]), int argc, char *argv[])
SIMIX_run();
xbt_os_walltimer_stop(global_timer);
SIMIX_run();
xbt_os_walltimer_stop(global_timer);
- if (xbt_cfg_get_boolean("smpi/display
_
timing")){
+ if (xbt_cfg_get_boolean("smpi/display
-
timing")){
double global_time = xbt_os_timer_elapsed(global_timer);
XBT_INFO("Simulated time: %g seconds. \n\n"
"The simulation took %g seconds (after parsing and platform setup)\n"
double global_time = xbt_os_timer_elapsed(global_timer);
XBT_INFO("Simulated time: %g seconds. \n\n"
"The simulation took %g seconds (after parsing and platform setup)\n"