Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
initial instrumentation points for the smpi component
[simgrid.git] / src / smpi / smpi_mpi.c
index 60bbfd675e5b78f2f3db98be909c1a33c62f49ca..65a0596a4f08f3f12886f5dcf47b32f8ba53cea1 100644 (file)
@@ -1,4 +1,8 @@
-/* $Id$tag */
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* 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 "private.h"
 #include "smpi_coll_private.h"
@@ -12,10 +16,16 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi,
 int MPI_Init(int* argc, char*** argv) {
   smpi_process_init(argc, argv);
   smpi_bench_begin(-1, NULL);
+#ifdef HAVE_TRACING
+  TRACE_smpi_init(smpi_process_index());
+#endif
   return MPI_SUCCESS;
 }
 
 int MPI_Finalize(void) {
+#ifdef HAVE_TRACING
+  TRACE_smpi_finalize(smpi_process_index());
+#endif
   smpi_bench_end(-1, NULL);
   smpi_process_destroy();
   return MPI_SUCCESS;