Collect: Can't collect and return the output when all the chunks are finished
Sometimes with Compute(wait = F)
and Collect() the results later on, Collect() keeps running because it thinks that the computation is in progress still, but on ecFlow UI, all the chunks are finished. The pattern hasn't been identified yet, not sure which step causes the mistake.
The problematic part is the variables at line238, if (sum_received_chunks / num_outputs == prod(unlist(chunks)))
[1] "sum_received_chunks"
[1] 0
[1] "num_outputs"
[1] 3
[1] "unlist(chunks)"
dat var latitude longitude
1 1 10 10
Since the calculation doesn't fulfill the if statement, Collect() doesn't collect the data and keep waiting for computation to be finished. If I tune the code and make Collect() return the output anyway, the returned output is correct. So the problem is the incorrect variables.