Dear Dr. Roland, Thanks for your insight and you are correct that I actually wanted to write back the interpolated values back onto the grid and so I was trying to access a grid function in Global mode and which I assume caused the segmentation fault as you told me. Yes, Sir I will try to debug it more and let you know if there is anything else.
Sir, So my one of the query is that:-- Is there any way, so that InterpGridArrays can use values at grid points on refinement level 0 while calculating interpolated values for grid points on refinement level 1?
Thanks for your help and time.
Thanks and regards Aryan Sharma
ᐧ
On Wed, Mar 4, 2020 at 7:04 AM Roland Haas rhaas@illinois.edu wrote:
Hello Aryan,
Thus, My query is:-- Is there any way to schedule my routine in global mode so that InterpGridArrays can use values at grid points on level 0 while
calculating
interpolated values for grid points on refinement level 1? If I simply
add
OPTION: global or OPTIONS: global loop-local in my schedule.ccl file, the run crashes with a segmentation fault.
Scheduling with "OPTION: global" or "OPTION: global-late" are the correct options to use for interpolation (exotic use cases aside).
To be sure: you do not need to write back the interpolated values onto the grid, right?
A segfault in "global" mode would normally indicate that you were trying to access a grid function, since those are not accessible in global mode. However if you also get the same segfault when using loop-local then this does not seem to be the cause of the segfault.
On top of my head I am not aware of any difference in accessible memory between "local" scheduled routines and "global loop-local" ones. If you compiled with enough debug options (and few enough -O levels) so that you get a useful backtrace, do you know the exact line in your code that causes the segfault?
Would it be possible for you to provide a demo thorn (stripped of physics, just the skeleton of the calls) that can be compiled and run demonstrate the issue (for example as an tar / zip attachment to an email)?
Yours, Roland
-- My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://pgp.mit.edu .