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. Could anyone help? Many Thanks, Alastair Gregory ------------------------------------------------------------------------------------------ Numerical Analysis Research Postgraduate Imperial College London - Grantham Institute of Climate Change Room 759 Huxley Building, South Kensington (Tel: 07794 243913) | (Email: a.gregory14@imperial.ac.uk) -------------------------------------------------------------------------------------------
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
Cheers, yes I've set up an issue. https://github.com/firedrakeproject/firedrake/issues/709 I think that I might well be at the limit of that complexity unfortunately. Many Thanks, Alastair ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: 17 February 2016 12:16 To: firedrake Subject: Re: [firedrake] Par Loop Issues 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
participants (2)
- 
                
                Gregory, Alastair
- 
                
                Lawrence Mitchell