From: pini Date: Wed, 27 Jan 2010 12:50:10 +0000 (+0000) Subject: In smpi_mpi.c: X-Git-Tag: SVN~705 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0180214bb4dd8910109e9a44ba115dc55e98629d?ds=sidebyside In smpi_mpi.c: * Added last missing timing functions In smpi_global.c: * Fix for the segfault when trying to set reference_speed from command line git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7026 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index aef451ddb5..2c86f2ba9c 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -313,8 +313,11 @@ smx_cond_t smpi_process_cond() static void smpi_cfg_cb_host_speed(const char *name, int pos) { - smpi_global->reference_speed = - xbt_cfg_get_double_at(_surf_cfg_set, name, pos); + if(smpi_global) + { + smpi_global->reference_speed = + xbt_cfg_get_double_at(_surf_cfg_set, name, pos); + } } int smpi_run_simulation(int *argc, char **argv) diff --git a/src/smpi/smpi_mpi.c b/src/smpi/smpi_mpi.c index 9914838ceb..2586730253 100644 --- a/src/smpi/smpi_mpi.c +++ b/src/smpi/smpi_mpi.c @@ -632,13 +632,14 @@ int SMPI_MPI_Alltoallv(void *sendbuf, int *scounts, int *sdisps, MPI_Datatype da int retval = MPI_SUCCESS; int rank; + smpi_bench_end(); rank = smpi_mpi_comm_rank(comm); DEBUG1("<%d> basic alltoallv() called.",rank); retval = smpi_coll_basic_alltoallv(sendbuf, scounts, sdisps, datatype, recvbuf, rcounts, rdisps, recvtype, comm); - + smpi_bench_begin(); return retval; } @@ -779,7 +780,12 @@ int SMPI_MPI_Comm_split(MPI_Comm comm, int color, int key, double SMPI_MPI_Wtime(void) { - return (SIMIX_get_clock()); + double time; + + smpi_bench_end(); + time = SIMIX_get_clock(); + smpi_bench_begin(); + return time; }