Open vsht opened 4 years ago
This solution https://mathematica.stackexchange.com/questions/213537/how-to-create-a-progress-bar-using-wolframscript should be sufficient to make the progress bar work in terminal.
Would be nice to allow for a parallel version of this (useful when aLotOfAmps
is a huge list, and evalFun
takes time).
To give you an idea, I often use this sort of construct:
(** Suppose there exists a user-defined $ParallelizeOptions variable that
** holds a list of options to control the behaviour of ParallelMap[],
** and that parallelization can be controlled with a $Parallelize boolean. **)
len=Length@aLotOfAmps;
Module[{counter}, SetSharedVariable[counter];counter=0;
Print(*Temporary*)["Element: ", Dynamic[counter], "/", len];
res = If[$Parallelize, ParallelMap[##, Sequence@@$ParallelizeOptions]&, Map][
(
counter++;
ClearSystemCache[]; (* To clean up as much memory as possible in the parallel kernel *)
evalFun[#]
)&
, #]& @ aLotOfAmps;
];
The idea is to have a useful visualization of calculations that go like
Currently there is no nice way to see
Remaining tasks