Skip to content

Commit

Permalink
fix pcontrol disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
tim0s committed Oct 22, 2023
1 parent a90b32e commit dda141f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/liballprof2/gencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ def produce_pcontrol(self, mode):
deref = ""
if mode == 'fortran':
deref = "*"
self.outfile.write(f" if ({deref}level == 0) lap_tracing_enabled = 0;\n")
self.outfile.write(f" if ({deref}level > 0) lap_tracing_enabled = 1;\n")
self.outfile.write(f" if ({deref}level > 1) lap_elem_tracing_enabled = 1;\n")
self.outfile.write(f" if ({deref}level > 2) lap_backtrace_enabled = 1;\n")
self.outfile.write(f" if ({deref}level == 0) {{ lap_tracing_enabled = 0; lap_elem_tracing_enabled = 0; lap_backtrace_enabled = 0; }}\n")
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")
if mode == 'c':
self.outfile.write(f" return MPI_SUCCESS;\n")

Expand Down

0 comments on commit dda141f

Please sign in to comment.