From: Gabriel Corona Date: Thu, 4 Dec 2014 09:45:49 +0000 (+0100) Subject: Merge branch 'master' X-Git-Tag: v3_12~732^2~165 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5a99bd94a2cedf8b455e78de53b19bebab8c034e?hp=f42358a7200f087c9047de7c7eaca0ad7d907c5c Merge branch 'master' --- diff --git a/include/simgrid/modelchecker.h b/include/simgrid/modelchecker.h index 6fe5c2c5a2..0d41344468 100644 --- a/include/simgrid/modelchecker.h +++ b/include/simgrid/modelchecker.h @@ -52,7 +52,7 @@ XBT_PUBLIC(void) MC_ignore(void *addr, size_t size); * * This is a path as generated by `MC_record_stack_to_string()`. */ -extern char* MC_record_path; +XBT_PUBLIC_DATA(char*) MC_record_path; /** Whether the replay mode is enabled */ static inline bool MC_record_replay_is_active(void) { diff --git a/src/mc/mc_base.c b/src/mc/mc_base.c index bd43d7a1ae..82ca8c6a4f 100644 --- a/src/mc/mc_base.c +++ b/src/mc/mc_base.c @@ -101,7 +101,11 @@ static int prng_random(int min, int max) // Use rejection in order to avoid skew long x; do { +#ifndef _XBT_WIN32 x = random(); +#else + x = rand(); +#endif } while( x >= accept_size ); return min + (x % output_size); } diff --git a/src/mc/mc_base.h b/src/mc/mc_base.h index 34852e4238..c46241459f 100644 --- a/src/mc/mc_base.h +++ b/src/mc/mc_base.h @@ -9,7 +9,7 @@ #include #include "simgrid_config.h" - +#include "internal_config.h" #include "../simix/smx_private.h" SG_BEGIN_DECL() diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 00b8f2b39f..6c3b74252d 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -4,6 +4,9 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "mc_base.h" + +#ifndef _XBT_WIN32 #include #include #include @@ -13,6 +16,7 @@ #define UNW_LOCAL_ONLY #include +#endif #include "simgrid/sg_config.h" #include "../surf/surf_private.h" diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index 89a7959bee..3fc88bcb1b 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -827,6 +827,11 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_string, 1, 1, NULL, NULL); xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/lat_factor", "65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467"); + xbt_cfg_register(&_sg_cfg_set, "smpi/IB_penalty_factors", + "Correction factor to communications using Infiniband model with contention (default value based on Stampede cluster profiling)", + xbt_cfgelm_string, 1, 1, NULL, NULL); + xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/IB_penalty_factors", "0.965;0.925;1.35"); + #ifdef HAVE_SMPI xbt_cfg_register(&_sg_cfg_set, "smpi/running_power", "Power of the host running the simulation (in flop/s). Used to bench the operations.", @@ -868,11 +873,6 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_boolean, 1, 1, NULL, NULL); xbt_cfg_setdefault_boolean(_sg_cfg_set, "smpi/privatize_global_variables", "no"); - xbt_cfg_register(&_sg_cfg_set, "smpi/IB_penalty_factors", - "Correction factor to communications using Infiniband model with contention (default value based on Stampede cluster profiling)", - xbt_cfgelm_string, 1, 1, NULL, NULL); - xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/IB_penalty_factors", "0.965;0.925;1.35"); - xbt_cfg_register(&_sg_cfg_set, "smpi/os", "Small messages timings (MPI_Send minimum time for small messages)", xbt_cfgelm_string, 1, 1, NULL, NULL); diff --git a/src/smpi/colls/allgatherv-mpich-rdb.c b/src/smpi/colls/allgatherv-mpich-rdb.c index 58195e814d..e4edda955e 100644 --- a/src/smpi/colls/allgatherv-mpich-rdb.c +++ b/src/smpi/colls/allgatherv-mpich-rdb.c @@ -21,7 +21,7 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( MPI_Status status; MPI_Aint recvtype_extent, recvtype_true_extent, recvtype_true_lb; int curr_cnt, dst, total_count; - void *tmp_buf; + void *tmp_buf, *tmp_buf_rl; int mask, dst_tree_root, my_tree_root, position, send_offset, recv_offset, last_recv_cnt=0, nprocs_completed, k, offset, tmp_mask, tree_root; @@ -42,10 +42,10 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( smpi_datatype_extent(recvtype, &recvtype_true_lb, &recvtype_true_extent); - tmp_buf= (void*)smpi_get_tmp_sendbuffer(total_count*(max(recvtype_true_extent,recvtype_extent))); + tmp_buf_rl= (void*)smpi_get_tmp_sendbuffer(total_count*(max(recvtype_true_extent,recvtype_extent))); /* adjust for potential negative lower bound in datatype */ - tmp_buf = (void *)((char*)tmp_buf - recvtype_true_lb); + tmp_buf = (void *)((char*)tmp_buf_rl - recvtype_true_lb); /* copy local data into right location in tmp_buf */ position = 0; @@ -209,6 +209,6 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( position += recvcounts[j]; } - smpi_free_tmp_buffer(tmp_buf); + smpi_free_tmp_buffer(tmp_buf_rl); return MPI_SUCCESS; } diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index dba43c97c7..57ae7e0b0f 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -348,15 +348,15 @@ void smpi_mpi_start(MPI_Request request) if (request->flags & RMA || request->size < sg_cfg_get_int("smpi/async_small_thres")){ //We have to check both mailboxes (because SSEND messages are sent to the large mbox). begin with the more appropriate one : the small one. mailbox = smpi_process_mailbox_small(); - XBT_DEBUG("Is there a corresponding send already posted the small mailbox %p (in case of SSEND)?", mailbox); - smx_synchro_t action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request); + XBT_DEBUG("Is there a corresponding send already posted in the small mailbox %p (in case of SSEND)?", mailbox); + smx_synchro_t action = SIMIX_comm_iprobe(SIMIX_process_self(), mailbox, 0, request->src,request->tag, &match_recv, (void*)request); if(action ==NULL){ mailbox = smpi_process_mailbox(); XBT_DEBUG("No, nothing in the small mailbox test the other one : %p", mailbox); - action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request); + action = SIMIX_comm_iprobe(SIMIX_process_self(), mailbox, 0, request->src,request->tag, &match_recv, (void*)request); if(action ==NULL){ - XBT_DEBUG("Still notching, switch back to the small mailbox : %p", mailbox); + XBT_DEBUG("Still nothing, switch back to the small mailbox : %p", mailbox); mailbox = smpi_process_mailbox_small(); } }else{ @@ -365,7 +365,7 @@ void smpi_mpi_start(MPI_Request request) }else{ mailbox = smpi_process_mailbox_small(); XBT_DEBUG("Is there a corresponding send already posted the small mailbox?"); - smx_synchro_t action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request); + smx_synchro_t action = SIMIX_comm_iprobe(SIMIX_process_self(), mailbox, 0, request->src,request->tag, &match_recv, (void*)request); if(action ==NULL){ XBT_DEBUG("No, nothing in the permanent receive mailbox"); @@ -422,7 +422,7 @@ void smpi_mpi_start(MPI_Request request) if (request->flags & RMA || request->size < sg_cfg_get_int("smpi/async_small_thres")) { // eager mode mailbox = smpi_process_remote_mailbox(receiver); XBT_DEBUG("Is there a corresponding recv already posted in the large mailbox %p?", mailbox); - smx_synchro_t action = simcall_comm_iprobe(mailbox, 1,request->dst, request->tag, &match_send, (void*)request); + smx_synchro_t action = SIMIX_comm_iprobe(SIMIX_process_self(), mailbox, 1,request->dst, request->tag, &match_send, (void*)request); if(action ==NULL){ if (! (request->flags & SSEND)){ mailbox = smpi_process_remote_mailbox_small(receiver); @@ -430,7 +430,7 @@ void smpi_mpi_start(MPI_Request request) } else{ mailbox = smpi_process_remote_mailbox_small(receiver); XBT_DEBUG("SSEND : Is there a corresponding recv already posted in the small mailbox %p?", mailbox); - action = simcall_comm_iprobe(mailbox, 1,request->dst, request->tag, &match_send, (void*)request); + action = SIMIX_comm_iprobe(SIMIX_process_self(), mailbox, 1,request->dst, request->tag, &match_send, (void*)request); if(action ==NULL){ XBT_DEBUG("No, we are first, send to large mailbox"); mailbox = smpi_process_remote_mailbox(receiver);