You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here each param_ranks refers to a vector of parameters to apply, so each thread is responsible for as many searches that there are parameters in param_ranks.
Possible enhancement
What happens if more threads are provided than searches? For example using -x 0 -t 8, there are 4 searches, so 4 threads out of 8 will run on a empty vector of parameters. One may argue that since the run_solve lambda loops over parameters, nothing is done and it's fine. Fair enough and this is what has been happening ever since the first implementation. Now that would be better still to only fire threads on non-empty parameter sets.
Now a bug
It gets worse with the time-out introduced in #595 since run_solve now divides the available time by the number of parameters:
The
CVRP::solve
implementation fires a number of threads based on thenb_threads
parameter (same forVRPTW::solve
):vroom/src/problems/cvrp/cvrp.cpp
Lines 237 to 239 in cd40a64
Here each
param_ranks
refers to a vector of parameters to apply, so each thread is responsible for as many searches that there are parameters inparam_ranks
.Possible enhancement
What happens if more threads are provided than searches? For example using
-x 0 -t 8
, there are 4 searches, so 4 threads out of 8 will run on a empty vector of parameters. One may argue that since therun_solve
lambda loops over parameters, nothing is done and it's fine. Fair enough and this is what has been happening ever since the first implementation. Now that would be better still to only fire threads on non-empty parameter sets.Now a bug
It gets worse with the time-out introduced in #595 since
run_solve
now divides the available time by the number of parameters:vroom/src/problems/cvrp/cvrp.cpp
Lines 194 to 200 in cd40a64
$ vroom -i input.json -x 0 -t 8 # output OK $ vroom -i input.json -x 0 -t 8 -l 0 Floating point exception (core dumped)
The text was updated successfully, but these errors were encountered: