# How to monitor a big program?

Is it possible to know how much % of calculations are done in a big program?

In other words, % will increase gradually when the calculations are progressing. I want to see the %.

• Try using Monitor – J42161217 Apr 1 at 10:31
• You may also be interested in the ForScience paclet which includes a very nice ProgressReport function. – Carl Lange Apr 1 at 10:59

## 1 Answer

You need to estimate and display that percentage yourself. This estimation must be part of the program you write. There is no way to do it automatically either in Mathematica or any other system. Theoretically, it is not even possible to decide if an arbitrary algorithm will ever finish, let alone how many steps away it is from finishing.

If your algorithm is a simple loop, in practice Monitor is often useful.

Monitor[ Table[Pause[1]; i^2, {i, 30}], i ]


My point still stands though. Here, i could be used as a proxy for progress. In a complicated program, you need to compute a value that can be used for this purpose yourself. Then you can use Monitor with it.