Dear all,
For a new project on a compute cluster I am attempting to install legacy FEniCS using conda.
I use the following environment.yml file to create my conda environment:
name: newenv
channels:
- conda-forge
dependencies:
- fenics
- pip
- git
- python >=3.8
Installation does not generate any errors.
Then, I try the following:
from dolfin import *
Exp = Expression('5', degree=0)
Upon which I receive the following error message:
dijitso failed to load existing file:
/home/user/.conda/envs/testenv/.cache/dijitso/lib/libdijitso-dolfin_expression_c14489d6e2980e09728dad365e75ccf0.so
error is:
libpetsc.so.3.15: cannot open shared object file: No such file or directory
dijitso failed to load existing file:
/home/user/.conda/envs/testenv/.cache/dijitso/lib/libdijitso-dolfin_expression_c14489d6e2980e09728dad365e75ccf0.so
error is:
libpetsc.so.3.15: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/user/.conda/envs/testenv/lib/python3.12/site-packages/dolfin/jit/jit.py", line 168, in compile_class
submodule = dijitso.extract_factory_function(module, "create_" + module_name)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.conda/envs/testenv/lib/python3.12/site-packages/dijitso/jit.py", line 47, in extract_factory_function
function = getattr(lib, name)
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'create_dolfin_expression_c14489d6e2980e09728dad365e75ccf0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/.conda/envs/testenv/lib/python3.12/site-packages/dolfin/function/expression.py", line 400, in __init__
self._cpp_object = jit.compile_expression(cpp_code, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.conda/envs/testenv/lib/python3.12/site-packages/dolfin/function/jit.py", line 158, in compile_expression
expression = compile_class(cpp_data, mpi_comm=mpi_comm)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.conda/envs/testenv/lib/python3.12/site-packages/dolfin/jit/jit.py", line 170, in compile_class
raise RuntimeError("Unable to compile C++ code with dijitso")
RuntimeError: Unable to compile C++ code with dijitso
My thoughts:
It appears that the issue may be related to a missing shared object file (libpetsc.so3.15) which is needed by dijitso during the compilation process. I think it is not necessary missing, but I think the environment variables are not correctly set up such that they point to the wrong location for this file.
What I tried:
-
“conda list” tells me that petsc version 3.20 is installed, and actually there is a file /home/user/.conda/envs/testenv/lib/libpetsc.so.3.20
-
I tried installing fenics 2018.1 in the same way, and I get a similar error using the same example code. However, this time, it concerns a different .so-file, “libmpi.so.40”
-
Setting the LD_LIBRARY_PATH variable manually:
export LD_LIBRARY_PATH=/home/user/.conda/envs/testenv/lib:$LD_LIBRARY_PATH
Trying the above steps, the issue persists.
I did not manage to find a solution to the problem yet. I wanted to share the issue with you all in hopes of getting some suggestions to approach it.
Thank you in advance for your ideas.