Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
setting categories with SMPI must always be after MPI_Init
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 28 Oct 2010 14:18:07 +0000 (14:18 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 28 Oct 2010 14:18:07 +0000 (14:18 +0000)
details:
- TRACE_smpi_set_category calls smpi_bench_end, which expects
that the smpi_bench was initialized
- programs will segfault if TRACE_smpi_set_category is called before
MPI_Init

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8475 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/smpi/NAS/DT-trace/dt-trace.c

index 89ab4de..f231553 100644 (file)
@@ -675,11 +675,11 @@ int main(int argc,char **argv ){
   double bytes_sent=2.0,tot_time=0.0;
 
 
-    TRACE_smpi_set_category ("start");
 
     MPI_Init( &argc, &argv );
     MPI_Comm_rank( MPI_COMM_WORLD, &my_rank );
     MPI_Comm_size( MPI_COMM_WORLD, &comm_size );
+    TRACE_smpi_set_category ("start");
 
      if(argc!=2||
                 (  strncmp(argv[1],"BH",2)!=0