There are a variety of built in tools for timing Warp simulations. Basic timings are always saved and can be accessed. This will print out some of the timings: printtimers() The timings of installed functions is also always saved. This will print out this data: printtimers(icontrollers=2) For some of the main physics packages, timings for the Fortran subroutines can be turned on. top.ltoptimesubs = true w3d.lw3dtimesubs = true f3d.lf3dtimesubs = true With these flags set, printtimers will printout the timings of major Fortran subroutines. This can be a lot of data to examine - the option mintime argument is useful, showing only subroutines that have times greater than mintime. For timing python level routines, Forthon provides a detailed timing and profiling package, ForthonTimer. from Forthon.ForthonTimer import ForthonProfiler ppp = ForthonProfiler() At the end of the section being timed, the following will print out the time (and call level) of the python routines accessed: ppp.out(maxlevel=3,mintime=1.) maxlevel specifies the call depth to list and mintime the minimum run time above which routines are listed. Note that this output can be voluminous. |