<div dir="ltr">Dear Dr. Roland,<div>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.</div><div><br></div><div>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?</div><div><br></div><div>Thanks for your help and time.</div><div><br></div><div>Thanks and regards</div><div>Aryan Sharma</div><div><br></div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aYXJ5YW4uMDgxLmFzQGdtYWlsLmNvbQ%3D%3D&type=zerocontent&guid=ede44baf-fbde-459e-a860-338bcbd1a7f4"><font color="#ffffff" size="1">ᐧ</font></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 7:04 AM Roland Haas <<a href="mailto:rhaas@illinois.edu">rhaas@illinois.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Aryan,<br>
<br>
> Thus, My query is:--<br>
> Is there any way to schedule my routine in global mode so that<br>
> InterpGridArrays can use values at grid points on level 0 while calculating<br>
> interpolated values for grid points on refinement level 1? If I simply add<br>
> OPTION: global or OPTIONS: global loop-local in my schedule.ccl file, the<br>
> run crashes with a segmentation fault.<br>
Scheduling with "OPTION: global" or "OPTION: global-late" are the correct options to use for interpolation (exotic use cases aside). <br>
<br>
To be sure: you do not need to write back the interpolated values onto the grid, right?<br>
<br>
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. <br>
<br>
On top of my head I am not aware of any difference in accessible memory between <br>
"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?<br>
<br>
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)?<br>
<br>
Yours,<br>
Roland<br>
<br>
-- <br>
My email is as private as my paper mail. I therefore support encrypting<br>
and signing email messages. Get my PGP key from <a href="http://pgp.mit.edu" rel="noreferrer" target="_blank">http://pgp.mit.edu</a> .<br>
</blockquote></div>