On 17/02/16 11:47, Gregory, Alastair wrote:
Hi firedrakers,
Is there a limit to the number of Dictionary inputs you can put into parloop(kernel,dx,Dictionary)? I have to input an arbitrary amount of functions (N) into a kernel, via appending them to a dictionary, and then carry out a simple linear expression using all functions for each cell.
As for the linear combination, it is simply,
a(1)*function(1) + ..... + a(N)*function(N) where a's are constants.
I do some string appending etc to get the above as a string that I can put directly into a kernel.
However, when I input over ~50 functions (which is a lot but theoretically C should be able to do this) the linear expression returns NaNs for each of the cells. The kernel seems to be correctly implemented, however it looks like the C under the hood is breaking down.
C implementations do not guarantee to support more than 127 function arguments. Each function that you pass in requires the data, plus the map data. So I can imagine that you might be getting close to this limit. Can you send some code (preferably by filing a github issue) that demonstrates this problem? Lawrence