diff --git a/build/mpi_c_wrapper.c b/build/mpi_c_wrapper.c index 7723c72..576df55 100644 --- a/build/mpi_c_wrapper.c +++ b/build/mpi_c_wrapper.c @@ -110,10 +110,6 @@ static void lap_collect_traces(void) { free(chunkbuf); } -void lap_write_epoch(int epoch) { - WRITE_TRACE("# epoch %i\n", epoch); -} - int MPI_Abort (MPI_Comm comm, int errorcode) { if (lap_tracing_enabled == 0) { int pmpi_retval; pmpi_retval = PMPI_Abort(comm, errorcode); @@ -5925,6 +5921,7 @@ int MPI_Pcontrol (const int level, ...) { if (level == 1) { lap_tracing_enabled = 1; lap_elem_tracing_enabled = 0; lap_backtrace_enabled = 0; } if (level == 2) { lap_tracing_enabled = 1; lap_elem_tracing_enabled = 1; lap_backtrace_enabled = 0; } if (level >= 3) { lap_tracing_enabled = 1; lap_elem_tracing_enabled = 1; lap_backtrace_enabled = 1; } + WRITE_TRACE("# pcontrol with value / epoch %i)\n", level); return MPI_SUCCESS; } diff --git a/build/mpi_f_wrapper.c b/build/mpi_f_wrapper.c index 02b8c55..d67a68a 100644 --- a/build/mpi_f_wrapper.c +++ b/build/mpi_f_wrapper.c @@ -467,10 +467,6 @@ void FortranCInterface_GLOBAL(pmpi_wtick,PMPI_WTICK) (int* ierr); void FortranCInterface_GLOBAL(pmpi_wtime,PMPI_WTIME) (int* ierr); -void FortranCInterface_GLOBAL(lap_write_epoch,LAP_WRITE_EPOCH) (int* epoch) { - WRITE_TRACE("# epoch %i\n", *epoch); -} - void FortranCInterface_GLOBAL(mpi_abort,MPI_ABORT) (int* comm, int* errorcode, int* ierr) { if (lap_tracing_enabled == 0) { int pmpi_retval; FortranCInterface_GLOBAL(pmpi_abort,PMPI_ABORT)(comm, errorcode, ierr); @@ -5835,6 +5831,7 @@ void FortranCInterface_GLOBAL(mpi_pcontrol,MPI_PCONTROL) (int* level, int* ierr) if (*level == 1) { lap_tracing_enabled = 1; lap_elem_tracing_enabled = 0; lap_backtrace_enabled = 0; } if (*level == 2) { lap_tracing_enabled = 1; lap_elem_tracing_enabled = 1; lap_backtrace_enabled = 0; } if (*level >= 3) { lap_tracing_enabled = 1; lap_elem_tracing_enabled = 1; lap_backtrace_enabled = 1; } + WRITE_TRACE("# pcontrol with value / epoch %i)\n", *level); } void FortranCInterface_GLOBAL(mpi_probe,MPI_PROBE) (int* source, int* tag, int* comm, int* status, int* ierr) { diff --git a/src/liballprof2/gencode.py b/src/liballprof2/gencode.py index 61bd843..ab0a4c9 100755 --- a/src/liballprof2/gencode.py +++ b/src/liballprof2/gencode.py @@ -293,18 +293,6 @@ def produce_fortran_pmpi_prototypes(self): self.outfile.write(f"void FortranCInterface_GLOBAL({pfunc.lower()},{pfunc.upper()}) ({params})"+";\n") self.outfile.write("\n\n") - def produce_lap_util(self, mode): - ref = "" - if mode == 'fortran': - ref = "*" - pfunc = "lap_write_epoch" - params = f"int{ref} epoch" - if mode == 'fortran': - self.outfile.write(f"void FortranCInterface_GLOBAL({pfunc.lower()},{pfunc.upper()}) ({params})"+" {\n") - else: - self.outfile.write(f"void {pfunc}({params})"+" {\n") - self.outfile.write(f" WRITE_TRACE(\"# epoch %i\\n\", {ref}epoch);\n") - self.outfile.write("}\n\n") def produce_pmpi_only_if_tracing_disabled(self, func, mode): self.outfile.write(f" if (lap_tracing_enabled == 0) {{ \n") @@ -325,6 +313,7 @@ def produce_pcontrol(self, mode): self.outfile.write(f" if ({deref}level == 1) {{ lap_tracing_enabled = 1; lap_elem_tracing_enabled = 0; lap_backtrace_enabled = 0; }}\n") self.outfile.write(f" if ({deref}level == 2) {{ lap_tracing_enabled = 1; lap_elem_tracing_enabled = 1; lap_backtrace_enabled = 0; }}\n") self.outfile.write(f" if ({deref}level >= 3) {{ lap_tracing_enabled = 1; lap_elem_tracing_enabled = 1; lap_backtrace_enabled = 1; }}\n") + self.outfile.write(f" WRITE_TRACE(\"# pcontrol with value / epoch %i)\\n\", {deref}level);\n") if mode == 'c': self.outfile.write(f" return MPI_SUCCESS;\n") @@ -394,7 +383,6 @@ def produce_tracers(self, mode='c'): codegen.parse_semantics(args.semantics_file) codegen.outfile = open(args.c_output_file, "w") codegen.write_prolog(mode='c') - codegen.produce_lap_util(mode='c') codegen.produce_tracers(mode='c') codegen.outfile.close() @@ -406,7 +394,6 @@ def produce_tracers(self, mode='c'): codegen.outfile = open(args.fortran_output_file, "w") codegen.write_prolog(mode='fortran') codegen.produce_fortran_pmpi_prototypes() - codegen.produce_lap_util(mode='fortran') codegen.produce_tracers(mode='fortran') codegen.outfile.close()