diff --git a/build/mpi_c_wrapper.c b/build/mpi_c_wrapper.c index 7acbe9e..a9ecee2 100644 --- a/build/mpi_c_wrapper.c +++ b/build/mpi_c_wrapper.c @@ -260,14 +260,14 @@ int rank, size; PMPI_Comm_size(comm, &size); PMPI_Comm_rank(comm, &rank); WRITE_TRACE("%lli:", (long long int) PMPI_Type_c2f(sendtype)); WRITE_TRACE("%p:", recvbuf); WRITE_TRACE("%p,%i[", (void*) recvcounts, (int) size); - if (0) { } else { + if (lap_elem_tracing_enabled == 0) { } else { for (int trace_elem_idx=0; trace_elem_idx 0: @@ -247,7 +255,7 @@ def write_argument_tracers(self, func, mode): if (mode == 'fortran'): elem_count_expr = self.deref_args(elem_count_expr, func) self.outfile.write(f" WRITE_TRACE(\"%p,%i[\", (void*) {sem_param['name']}, (int) {elem_count_expr});\n") - self.outfile.write(f" if (0) {{ }} else {{ \n") + self.outfile.write(f" if (lap_elem_tracing_enabled == 0) {{ }} else {{ \n") self.outfile.write(f" for (int trace_elem_idx=0; trace_elem_idx<{elem_count_expr}; trace_elem_idx++) "+"{\n") # emit the tracer for the simplified arg, use ; to seperate elems diff --git a/src/liballprof2/gensem.py b/src/liballprof2/gensem.py index 212da6e..355ccef 100755 --- a/src/liballprof2/gensem.py +++ b/src/liballprof2/gensem.py @@ -41,7 +41,7 @@ def get_count_for_param_in_func(self, param, func): mapping = {} GET_NDIMS_CART_COMM = "int ndims; PMPI_Cartdim_get(comm, &ndims);" GET_COMM_SIZE = "int rank, size; PMPI_Comm_size(comm, &size); PMPI_Comm_rank(comm, &rank);" - GET_NEIGH_GRAPH_COMM = "int ideg, odeg, wted; MPI_Dist_graph_neighbors_count(comm, &ideg, &odeg, &wted);" + GET_NEIGH_GRAPH_COMM = "int ideg, odeg, wted; PMPI_Dist_graph_neighbors_count(comm, &ideg, &odeg, &wted);" mapping[("MPI_Cart_create", "dims")] = "ndims" mapping[("MPI_Cart_create", "periods")] = "ndims" mapping[("MPI_Cart_map", "dims")] = "ndims"