I am coding a project in which I need to call a FF++ script multiple times. This is script is parallelized (and this saves a lot of time) but there is a big overhead. As a mwe, when running a single script with one line containing int r = 0; by executing
it shows that the total running time was approximately 1.3 seconds, while compiling and running the script takes less than 0.007 seconds (compile 0.006177s, execution 3e-05s).
Is there any way to reduce such a big overhead? Thanks!
I cannot do it since the inputs of the n-th call depend the output of the (n-1)-th call. The outputs need to be processed in another program (written in Julia) before passing them.
But the overhead is independent of that . . . Whether it is just a simple script called directly from bash or a complex one called from somewhere else.
If it’s a “complex” script, then it’s likely to take a few second to complete, thus the overhead if relatively tiny, so it’s not an issue. Using MPI to run extremely fine-grained computations does not make sense, it was not designed for that, hence why I told you to not invoke FreeFem++-mpi multiple times.