Hello,
I installed fenicsx on google colab using
try:
import dolfinx
except ImportError:
!wget "https://fem-on-colab.github.io/releases/fenicsx-install-real.sh" -O "/tmp/fenicsx-install.sh" && bash "/tmp/fenicsx-install.sh"
import dolfinx
everything works well after that. Now if I’m recreating a fem.form repeatedly then I get the following errors after many successful executions
File "/content/gdrive/MyDrive/Github/HJDQN/HJQ/gym_lqr/gym_lqr/envs/lqrNd.py", line 344, in step
self.linear_form = form(self.L)
File "/usr/local/lib/python3.10/dist-packages/dolfinx/fem/forms.py", line 189, in form
return _create_form(form)
File "/usr/local/lib/python3.10/dist-packages/dolfinx/fem/forms.py", line 184, in _create_form
return _form(form)
File "/usr/local/lib/python3.10/dist-packages/dolfinx/fem/forms.py", line 144, in _form
ufcx_form, module, code = jit.ffcx_jit(mesh.comm, form,
File "/usr/local/lib/python3.10/dist-packages/dolfinx/jit.py", line 56, in mpi_jit
return local_jit(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/dolfinx/jit.py", line 204, in ffcx_jit
r = ffcx.codegeneration.jit.compile_forms([ufl_object], options=p_ffcx, **p_jit)
File "/usr/local/lib/python3.10/dist-packages/ffcx/codegeneration/jit.py", line 201, in compile_forms
obj, module = _load_objects(cache_dir, module_name, form_names)
File "/usr/local/lib/python3.10/dist-packages/ffcx/codegeneration/jit.py", line 319, in _load_objects
compiled_module = importlib.util.module_from_spec(spec)
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1176, in create_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: /root/.cache/fenics/libffcx_forms_9695f0f05d2260182b11169d5c2427ea9b4217f4.cpython-310-x86_64-linux-gnu.so: cannot change memory protections
First I thought the cache memory runs out, so I deleted the fenics folder in the cache regulary but it didn’t work. I also checked if the /tmp folder was set executable but this was also no problem, I tried refreshing the dolfinx module but this also didn’t work. Maybe someone did experience this error before? Any help would be highly appreciated.