diff options
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/MathematicaMisc/Errors.m | 2 | ||||
-rw-r--r-- | Tools/MathematicaMisc/RunKranc.m | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Tools/MathematicaMisc/Errors.m b/Tools/MathematicaMisc/Errors.m index 131997a..b085fdd 100644 --- a/Tools/MathematicaMisc/Errors.m +++ b/Tools/MathematicaMisc/Errors.m @@ -100,7 +100,7 @@ DefFn[def:(fn_[args___] := body_)] := Module[ {}, ErrorDefinition[fn]; - def]; + fn[args] := (*Profile[fn,*)body(*]*)]; End[]; diff --git a/Tools/MathematicaMisc/RunKranc.m b/Tools/MathematicaMisc/RunKranc.m index bd6dec6..b554c9c 100644 --- a/Tools/MathematicaMisc/RunKranc.m +++ b/Tools/MathematicaMisc/RunKranc.m @@ -8,6 +8,7 @@ $Path = Join[$Path, krancDir <> "/Tools/External"}]; Needs["Errors`"]; Needs["KrancThorn`"]; +Needs["Profile`"]; If[Environment["KRANCVERBOSE"] == "yes", SetDebugLevel[InfoFull]]; @@ -59,7 +60,23 @@ SetOptions["stdout", PageWidth -> Infinity]; exception = Catch[Catch[ Check[ - Get[script];None, + Block[ + {$RecursionLimit = Infinity}, + (*{result,timers} = GetTimers[ *) Get[script](*]*)]; + + (* Put[timers, "timer-output-1.m"]; *) + + (* timers = CoalesceTimers[timers]; *) + (* Put[timers, "timer-output-2.m"]; *) + + (* timers = ThresholdTimers[timers,0.1]; *) + (* Put[timers, "timer-output-3.m"]; *) + + (* (\* Put[timers2, "timer-output-2.m"]; *\) *) + + (* PrintTimerTree[timers]; *) + + None, ThrowError["Messages were generated - aborted"]]], _]; If[exception =!= None, |