Hi Andrew,

On Sat, 14 Aug 2021 at 20:18, Andrew Hicks <ahick17@lsu.edu> wrote:

Hello all,

 

I am struggling because I often get this same error popping up after I have been running many (several thousand) time steps of my PDE solve in Firedrake:

 

OSError: /scratch/ahick17/firedrake/.cache/pyop2/94/0b1edf26475b324382a572af1239dc.so: cannot change memory protections

 

Thankfully I always save state so I can simply resume the time steps and it always resolves. However, this is a bit annoying to have to deal with and I was wondering, what is causing this, and is there any way to fix it?


My guess is that you are running a time dependent problem with a term that depends in the current time for example sin(t)

Try using a Constant to store the current time and updating it in your time loop:

t = Constant(t_)
define time dependent form here
while t_ < tend:
    t.assign(t_)
    ...

Lawrence