Error in FENICS installation in ubuntu 21.04

Hello ! new to fenics here.
I have installed fenics as per directions from https://launchpad.net/~fenics-packages/+archive/ubuntu/fenics using following lines

sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update

I have following python versions

nikhil@starwars:~$ python
python              python3.10          python3-futurize
python2             python3.9           python3-pasteurize
python2.7           python3.9-config    python3-qr
python3             python3-config   

But even after installation , i am facing following errors in python3

nikhil@starwars:~$ python3
Python 3.9.5 (default, Nov 18 2021, 16:00:48) 
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fenics
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/fenics/__init__.py", line 7, in <module>
    from dolfin import *
  File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py", line 144, in <module>
    from .fem.assembling import (assemble, assemble_system, assemble_multimesh, assemble_mixed,
  File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/fem/assembling.py", line 38, in <module>
    from ufl.form import sub_forms_by_domain
ImportError: cannot import name 'sub_forms_by_domain' from 'ufl.form' (/home/nikhil/.local/lib/python3.9/site-packages/ufl/form.py)
>>> 

For python 3.10 i get following,

nikhil@starwars:~$ python3.10
Python 3.10.0b1 (default, May 11 2021, 08:45:09) [GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fenics
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/fenics/__init__.py", line 7, in <module>
    from dolfin import *
  File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py", line 34, in <module>
    from .cpp import __version__
ModuleNotFoundError: No module named 'dolfin.cpp'
>>> 

Can anyone help me here please ?

I presume you ran sudo apt-get upgrade as well as update, is that correct?

Can you report what is returned by

dpkg -l "*ufl*" "*ffc*" "*dolfin*" "*petsc*" | cat

and also the output of

python3 -c "import ufl; print(ufl.__path__)"
2 Likes
dpkg -l "*ufl*" "*ffc*" "*dolfin*" "*petsc*" | cat

gives following

nikhil@starwars:~$ dpkg -l "*ufl*" "*ffc*" "*dolfin*" "*petsc*" | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version                                      Architecture Description
+++-===============================-============================================-============-===============================================================
ii  dolfin-bin                      2019.2.0~git20201207.b495043-6~ppa1~hirsute1 all          Executable scripts for DOLFIN
ii  dolfin-doc                      2019.2.0~git20201207.b495043-6~ppa1~hirsute1 all          Documentation and demo programs for DOLFIN
ii  libdolfin-dev:amd64             2019.2.0~git20201207.b495043-6~ppa1~hirsute1 amd64        Shared links and development files for DOLFIN
ii  libdolfin-dev-common            2019.2.0~git20201207.b495043-4               all          Common header files for DOLFIN
un  libdolfin0-dev                  <none>                                       <none>       (no description available)
un  libdolfin1.0-dev                <none>                                       <none>       (no description available)
un  libdolfin1.1-dev                <none>                                       <none>       (no description available)
un  libdolfin1.2-dev                <none>                                       <none>       (no description available)
un  libdolfin1.3-dev                <none>                                       <none>       (no description available)
un  libdolfin1.4-dev                <none>                                       <none>       (no description available)
ii  libdolfin2019.2:amd64           2019.2.0~git20201207.b495043-6~ppa1~hirsute1 amd64        Shared libraries for DOLFIN
un  libkf5newstuffcore5             <none>                                       <none>       (no description available)
un  libpetsc-complex-3.6.2-dev      <none>                                       <none>       (no description available)
un  libpetsc-complex-3.6.3-dev      <none>                                       <none>       (no description available)
un  libpetsc-complex3.14-dev        <none>                                       <none>       (no description available)
ii  libpetsc-real3.14:amd64         3.14.5+dfsg1-2                               amd64        Shared libraries for version 3.14 of PETSc
un  libpetsc-real3.14-dbg           <none>                                       <none>       (no description available)
pi  libpetsc-real3.14-dev:amd64     3.14.5+dfsg1-2                               amd64        Static libraries, shared links, header files for PETSc
un  libpetsc3.14                    <none>                                       <none>       (no description available)
pi  libpetsc3.14-dev-common         3.14.5+dfsg1-2                               all          Common header and support dev files for PETSc
un  libpetsc3.14-dev-examples       <none>                                       <none>       (no description available)
un  libpetsc3.14.5-dev              <none>                                       <none>       (no description available)
un  libpetsc3.6                     <none>                                       <none>       (no description available)
un  libpetsc3.6.2-dev               <none>                                       <none>       (no description available)
un  libpetsc3.6.3-dev               <none>                                       <none>       (no description available)
un  petsc-dev                       <none>                                       <none>       (no description available)
un  petsc3.14-doc                   <none>                                       <none>       (no description available)
un  python-ffc                      <none>                                       <none>       (no description available)
un  python-petsc                    <none>                                       <none>       (no description available)
un  python-petsc4py                 <none>                                       <none>       (no description available)
ii  python-petsc4py-doc             3.14.1-1build1                               all          Python bindings for PETSc libraries: documentation and examples
un  python-petsc4py-docs            <none>                                       <none>       (no description available)
un  python-ufl                      <none>                                       <none>       (no description available)
ii  python-ufl-doc                  2019.2.0~git20210211.d60cd09-1build1         all          documentation and demos for UFL
ii  python3-dolfin                  2019.2.0~git20201207.b495043-6~ppa1~hirsute1 amd64        Base Python interface for DOLFIN (Python 3)
ii  python3-dolfin-real             2019.2.0~git20201207.b495043-6~ppa1~hirsute1 amd64        Python interface for DOLFIN
un  python3-dolfin64-real           <none>                                       <none>       (no description available)
pi  python3-ffc                     2019.2.0~git20210115.cb26c91-1               all          compiler for finite element variational forms (Python 3)
pi  python3-petsc4py                3.14.1-1build1                               all          Python 3 bindings for PETSc libraries
un  python3-petsc4py-64-complex     <none>                                       <none>       (no description available)
un  python3-petsc4py-64-complex3.14 <none>                                       <none>       (no description available)
un  python3-petsc4py-64-real        <none>                                       <none>       (no description available)
un  python3-petsc4py-64-real3.14    <none>                                       <none>       (no description available)
un  python3-petsc4py-complex        <none>                                       <none>       (no description available)
un  python3-petsc4py-complex3.14    <none>                                       <none>       (no description available)
pi  python3-petsc4py-real           3.14.1-1build1                               all          Python 3 bindings for PETSc libraries (real numbers)
pi  python3-petsc4py-real3.14       3.14.1-1build1                               amd64        Python 3 bindings for PETSc 3.14 libraries (real numbers)
pi  python3-ufl                     2019.2.0~git20210211.d60cd09-1build1         all          unified language for form-compilers (Python 3)
un  troffcvt                        <none>                                       <none>       (no description available)

and next command gives

nikhil@starwars:~$ python3 -c "import ufl; print(ufl.__path__)"
['/home/nikhil/.local/lib/python3.9/site-packages/ufl']

I have also followed instructions from Installation — FEniCS Project documentation

sudo apt-get install --no-install-recommends software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics

but no change in errors

This is your main problem. You’ve made a local installation of ufl, you’re not using the ufl package provided by Ubuntu or the PPA.

Apart from that, note also that ubuntu 21.04 (hirsute) is now out of support. You might want to upgrade your ubuntu to the latest release 22.04 (jammy).

1 Like

Hey @dparsons
i have upgraded myself to 22.04 ubuntu… It has python 3.10 as default. Now these commands gives following error

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl3 (= 3.0.2-0ubuntu1.1) but 3.0.2-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.

You might need to run

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

dist-upgrade helps set up new package versions for a new release.

I did this…dist-upgrade… also checked that i have latest version of libssl

nikhil@starwars:~$ sudo apt install libssl3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libssl3 is already the newest version (3.0.2-0ubuntu1.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But still,

nikhil@starwars:~$ sudo apt-get install --no-install-recommends fenics
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl3 (= 3.0.2-0ubuntu1.1) but 3.0.2-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.

It’s a strange error. Looks like there is an ubuntu update in progress messing up the dependency. Try again with sudo apt-get update in a day or two. You’ll need the version of libssl-dev to match the version of libssl3. Can you confirm you ran upgrade and dist-upgrade before attempting to install fenics?

Following is my terminal history

nikhil@starwars:~$ sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
[sudo] password for nikhil: 
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Hit:3 https://ppa.launchpadcontent.net/fenics-packages/fenics/ubuntu jammy InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease     
Get:5 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [79.8 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [156 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [53.3 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [30.7 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [87.5 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [87.2 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [6,624 B]
Fetched 720 kB in 3s (254 kB/s)                                      
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  gnome-settings-daemon gnome-settings-daemon-common
  libnautilus-extension1a nautilus nautilus-data zenity
  zenity-common
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,002 kB/1,349 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 nautilus amd64 1:42.1.1-0ubuntu1 [631 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 nautilus-data all 1:42.1.1-0ubuntu1 [11.3 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libnautilus-extension1a amd64 1:42.1.1-0ubuntu1 [16.1 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 zenity-common all 3.42.1-0ubuntu1 [276 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 zenity amd64 3.42.1-0ubuntu1 [67.3 kB]
Fetched 1,002 kB in 5s (215 kB/s) 
(Reading database ... 203587 files and directories currently installed.)
Preparing to unpack .../0-gnome-settings-daemon-common_42.1-1ubuntu2.1_all.deb ...
Unpacking gnome-settings-daemon-common (42.1-1ubuntu2.1) over (42.1-1ubuntu2) ...
Preparing to unpack .../1-gnome-settings-daemon_42.1-1ubuntu2.1_amd64.deb ...
Unpacking gnome-settings-daemon (42.1-1ubuntu2.1) over (42.1-1ubuntu2) ...
Preparing to unpack .../2-nautilus_1%3a42.1.1-0ubuntu1_amd64.deb ...
Unpacking nautilus (1:42.1.1-0ubuntu1) over (1:42.0-1ubuntu2) ...
Preparing to unpack .../3-nautilus-data_1%3a42.1.1-0ubuntu1_all.deb ...
Unpacking nautilus-data (1:42.1.1-0ubuntu1) over (1:42.0-1ubuntu2) ...
Preparing to unpack .../4-libnautilus-extension1a_1%3a42.1.1-0ubuntu1_amd64.deb ...
Unpacking libnautilus-extension1a:amd64 (1:42.1.1-0ubuntu1) over (1:42.0-1ubuntu2) ...
Preparing to unpack .../5-zenity-common_3.42.1-0ubuntu1_all.deb ...
Unpacking zenity-common (3.42.1-0ubuntu1) over (3.42.0-1) ...
Preparing to unpack .../6-zenity_3.42.1-0ubuntu1_amd64.deb ...
Unpacking zenity (3.42.1-0ubuntu1) over (3.42.0-1) ...
Setting up gnome-settings-daemon-common (42.1-1ubuntu2.1) ...
Setting up nautilus-data (1:42.1.1-0ubuntu1) ...
Setting up libnautilus-extension1a:amd64 (1:42.1.1-0ubuntu1) ...
Setting up zenity-common (3.42.1-0ubuntu1) ...
Setting up zenity (3.42.1-0ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libglib2.0-0:amd64 (2.72.1-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Setting up nautilus (1:42.1.1-0ubuntu1) ...
Setting up gnome-settings-daemon (42.1-1ubuntu2.1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nikhil@starwars:~$ sudo apt-get install --no-install-recommends fenics
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl3 (= 3.0.2-0ubuntu1.1) but 3.0.2-0ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.

You did not run upgrade/dist-upgrade.

@dparsons
I did run those two commands (check second and third lines in my previous terminal copy-paste)

I see it now. I was looking for the $ symbol and missed that the three commands ran together. Ubuntu seems to have put libssl-dev in an inconsistent state. Hopefully it will clear after the mirror servers catch the update.

2 Likes

Error now resolved with upgrade working…

nikhil@starwars:~$ python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fenics
>>> import dolfin
>>> import ufl
>>> import ffc
>>> 


1 Like

Sorry to reopen this discussion: I am trying to get the same installation work in Ubuntu 20.04, however, I am stuck with a different problem.

After following the above steps I get:
test@tud278242:~$ python3 -c "import fenics" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3/dist-packages/fenics/__init__.py", line 7, in <module> from dolfin import * File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py", line 34, in <module> from .cpp import __version__ ImportError: libfftw3.so.3: cannot open shared object file: No such file or directory

Any recommendation will be really appreciated.

I’ve checked to confirm fenics and dolfin are currently importing cleanly on a fresh install of Ubuntu 20.04 (focal).

There is currently a problem with dolfinx on 20.04 while the transition to the new release 0.4 is underway. But old dolfin installs and runs okay.

Your error message indicates you’re missing libfftw3, which would normally be installed automatically through the debian/ubuntu package dependencies. How did you install fenics?

p.s. you can copy code output in this forum using a preformatted text block (the </> icon, or type between triple backticks ```).

I installed in the same way as mentioned above:

sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update

and I get the following output for what was asked previously:

nanand@THES-HEX:~/source/fenics-2019.1.0.r1/mshr/build$ dpkg -l "*ufl*" "*ffc*" "*dolfin*" "*petsc*" | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version                                    Architecture Description
+++-===========================-==========================================-============-=============================================================
ii  dolfin-bin                  2019.2.0~git20220407.d29e24d-5~ppa1~focal1 all          Executable scripts for DOLFIN
ii  dolfin-doc                  2019.2.0~git20220407.d29e24d-5~ppa1~focal1 all          Documentation and demo programs for DOLFIN
ii  libdolfin-dev:amd64         2019.2.0~git20220407.d29e24d-5~ppa1~focal1 amd64        Shared links and development files for DOLFIN
ii  libdolfin-dev-common        2019.2.0~git20220407.d29e24d-5~ppa1~focal1 all          Common header files for DOLFIN
un  libdolfin0-dev              <none>                                     <none>       (no description available)
un  libdolfin1.0-dev            <none>                                     <none>       (no description available)
un  libdolfin1.1-dev            <none>                                     <none>       (no description available)
un  libdolfin1.2-dev            <none>                                     <none>       (no description available)
un  libdolfin1.3-dev            <none>                                     <none>       (no description available)
un  libdolfin1.4-dev            <none>                                     <none>       (no description available)
ii  libdolfin2019.2:amd64       2019.2.0~git20220407.d29e24d-5~ppa1~focal1 amd64        Shared libraries for DOLFIN
un  libpetsc-complex-3.6.2-dev  <none>                                     <none>       (no description available)
un  libpetsc-complex-3.6.3-dev  <none>                                     <none>       (no description available)
un  libpetsc-complex3.12-dbg    <none>                                     <none>       (no description available)
un  libpetsc-complex3.12-dev    <none>                                     <none>       (no description available)
ii  libpetsc-real-dev           3.12.4+dfsg1-1                             all          Virtual package depending on latest PETSc development package
ii  libpetsc-real3.12:amd64     3.12.4+dfsg1-1                             amd64        Shared libraries for version 3.12 of PETSc
un  libpetsc-real3.12-dbg       <none>                                     <none>       (no description available)
ii  libpetsc-real3.12-dev:amd64 3.12.4+dfsg1-1                             amd64        Static libraries, shared links, header files for PETSc
un  libpetsc3.12                <none>                                     <none>       (no description available)
ii  libpetsc3.12-dev-common     3.12.4+dfsg1-1                             all          Common header and support dev files for PETSc
ii  libpetsc3.12-dev-examples   3.12.4+dfsg1-1                             all          Static libraries, shared links, header files for PETSc
un  libpetsc3.12.4-dev          <none>                                     <none>       (no description available)
un  libpetsc3.6                 <none>                                     <none>       (no description available)
un  libpetsc3.6.2-dev           <none>                                     <none>       (no description available)
un  libpetsc3.6.3-dev           <none>                                     <none>       (no description available)
un  petsc-dev                   <none>                                     <none>       (no description available)
un  petsc3.12-doc               <none>                                     <none>       (no description available)
un  python-ffc                  <none>                                     <none>       (no description available)
un  python-petsc4py-doc         <none>                                     <none>       (no description available)
un  python-ufl                  <none>                                     <none>       (no description available)
ii  python-ufl-doc              2022.1.0-1exp2~ppa1~focal1                 all          documentation and demos for UFL
ii  python3-dolfin              2019.2.0~git20220407.d29e24d-5~ppa1~focal1 amd64        Base Python interface for DOLFIN (Python 3)
ii  python3-dolfin-real         2019.2.0~git20220407.d29e24d-5~ppa1~focal1 amd64        Python interface for DOLFIN
un  python3-dolfin64-real       <none>                                     <none>       (no description available)
ii  python3-ffc                 2019.2.0~git20210714.a20cbe7-1~ppa1~focal1 all          compiler for finite element variational forms (Python 3)
ii  python3-petsc4py            3.12.0-4build1                             all          Python 3 bindings for PETSc libraries
un  python3-petsc4py-complex    <none>                                     <none>       (no description available)
ii  python3-petsc4py-real       3.12.0-4build1                             amd64        Python 3 bindings for PETSc libraries (real numbers)
ii  python3-ufl                 2022.1.0-1exp2~ppa1~focal1                 all          unified language for form-compilers (Python 3)
un  troffcvt                    <none>                                     <none>       (no description available)

and

nanand@THES-HEX:~/source/fenics-2019.1.0.r1/mshr/build$ python3 -c "import ufl; print(ufl.__path__)"
['/usr/lib/python3/dist-packages/ufl']

I made some progress with the installation in past 30mins and now get a new error…

nanand@THES-HEX:~/source/fenics-2019.1.0.r1/mshr/build$ python3 -c "import dolfin"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/__init__.py", line 138, in <module>
    from . import parameter
  File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/__init__.py", line 11, in <module>
    from ffc import default_jit_parameters
  File "/usr/local/lib/python3.8/dist-packages/ffc/__init__.py", line 24, in <module>
    from ffc.compiler import compile_form, compile_element
  File "/usr/local/lib/python3.8/dist-packages/ffc/compiler.py", line 129, in <module>
    from ffc.codegeneration import generate_code
  File "/usr/local/lib/python3.8/dist-packages/ffc/codegeneration.py", line 37, in <module>
    import ffc.uflacs.language.cnodes as L
  File "/usr/local/lib/python3.8/dist-packages/ffc/uflacs/__init__.py", line 23, in <module>
    from ffc.uflacs.uflacsrepresentation import compute_integral_ir
  File "/usr/local/lib/python3.8/dist-packages/ffc/uflacs/uflacsrepresentation.py", line 26, in <module>
    from ffc.representationutils import initialize_integral_ir
  File "/usr/local/lib/python3.8/dist-packages/ffc/representationutils.py", line 28, in <module>
    from ufl.cell import cellname2facetname
ImportError: cannot import name 'cellname2facetname' from 'ufl.cell' (/usr/lib/python3/dist-packages/ufl/cell.py)

Thanks in advance :slight_smile:

Your installed packages look fine. Another thing to try is a full dist-upgrade to make sure all package versions are fully up-to-date.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

but you’ve got a local installation of ffc, which the debian/ubuntu packages can’t fix.

Wow you really have great eye for details.

Thanks ! It is working now :smiley:

Thanks again for your help.

1 Like

So I have some follow-up issues, maybe because there are some dependencies and FEnics is not able to detect. I am getting the following error

`cylinder in cross-flow mesh has been created
meshcells 176360
Moving new file over differing existing file:
src: /home/nanand/source/FEniCSLab_Arthur/work/cylinder_cross_flow/jitfailure-dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f/error.log.a3d3a4f1b6d849d397366cb94925a5e1
dst: /home/nanand/source/FEniCSLab_Arthur/work/cylinder_cross_flow/jitfailure-dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f/error.log
backup: /home/nanand/source/FEniCSLab_Arthur/work/cylinder_cross_flow/jitfailure-dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f/error.log.old
Backup file exists, overwriting.
------------------- Start compiler output ------------------------
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: In member function ‘void dolfin::FilterWindow::set_ref_point(Eigen::Ref<const Eigen::Matrix<double, -1, 1> >)’:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:213:16: warning: comparison of integer expressions of different signedness: ‘Eigen::EigenBase<Eigen::Ref<const Eigen::Matrix<double, -1, 1> > >::Index’ {aka ‘long int’} and ‘std::size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
213 | if(znew.size()<=_gdim){
| ~^
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:214:29: warning: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘Eigen::EigenBase<Eigen::Ref<const Eigen::Matrix<double, -1, 1> > >::Index’ {aka ‘long int’} [-Wsign-compare]
214 | for (std::size_t i = 0; i < znew.size(); i++){
| ^
~~~~~~
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: In member function ‘virtual void dolfin::DoubleBoxAverage::eval(Eigen::Ref<Eigen::Matrix<double, -1, 1> >, Eigen::Ref<const Eigen::Matrix<double, -1, 1> >) const’:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:741:10: warning: unused variable ‘y2’ [-Wunused-variable]
741 | double y2 = x[2] - z[2];
| ^~
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: At global scope:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:3409:8: error: ‘void filterformtrianglecg1_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
3409 | void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:3409:8: error: ‘void filterformtrianglecg1_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘override’, but does not override
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: In member function ‘virtual ufc::cell_integral* filterformtrianglecg1_form_0::create_cell_integral(std::size_t) const’:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:3642:60: error: invalid new-expression of abstract class type ‘filterformtrianglecg1_cell_integral_0_1’
3642 | return new filterformtrianglecg1_cell_integral_0_1();
| ^
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:3389:7: note: because the following virtual functions are pure within ‘filterformtrianglecg1_cell_integral_0_1’:
3389 | class filterformtrianglecg1_cell_integral_0_1: public ufc::cell_integral
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dolfin/function/Expression.h:25,
from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:426:
/usr/lib/python3/dist-packages/ffc/backends/ufc/ufc.h:607:18: note: ‘virtual void ufc::cell_integral::tabulate_tensor(double*, const double* const*, const double*, int, std::size_t) const’
607 | virtual void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: At global scope:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8157:8: error: ‘void filterformtrianglecg2_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
8157 | void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8157:8: error: ‘void filterformtrianglecg2_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘override’, but does not override
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: In member function ‘virtual ufc::cell_integral* filterformtrianglecg2_form_0::create_cell_integral(std::size_t) const’:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8393:60: error: invalid new-expression of abstract class type ‘filterformtrianglecg2_cell_integral_0_1’
8393 | return new filterformtrianglecg2_cell_integral_0_1();
| ^
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8137:7: note: because the following virtual functions are pure within ‘filterformtrianglecg2_cell_integral_0_1’:
8137 | class filterformtrianglecg2_cell_integral_0_1: public ufc::cell_integral
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dolfin/function/Expression.h:25,
from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:426:
/usr/lib/python3/dist-packages/ffc/backends/ufc/ufc.h:607:18: note: ‘virtual void ufc::cell_integral::tabulate_tensor(double*, const double* const*, const double*, int, std::size_t) const’
607 | virtual void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
In file included from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8843:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTriangleDG0.h: At global scope:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTriangleDG0.h:3123:8: error: ‘void filterformtriangledg0_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
3123 | void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTriangleDG0.h:3123:8: error: ‘void filterformtriangledg0_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘override’, but does not override
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTriangleDG0.h: In member function ‘virtual ufc::cell_integral* filterformtriangledg0_form_0::create_cell_integral(std::size_t) const’:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTriangleDG0.h:3343:60: error: invalid new-expression of abstract class type ‘filterformtriangledg0_cell_integral_0_1’
3343 | return new filterformtriangledg0_cell_integral_0_1();
| ^
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTriangleDG0.h:3103:7: note: because the following virtual functions are pure within ‘filterformtriangledg0_cell_integral_0_1’:
3103 | class filterformtriangledg0_cell_integral_0_1: public ufc::cell_integral
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dolfin/function/Expression.h:25,
from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:426:
/usr/lib/python3/dist-packages/ffc/backends/ufc/ufc.h:607:18: note: ‘virtual void ufc::cell_integral::tabulate_tensor(double*, const double* const*, const double*, int, std::size_t) const’
607 | virtual void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
In file included from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8846:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronDG0.h: At global scope:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronDG0.h:4612:8: error: ‘void filterformtetrahedrondg0_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
4612 | void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronDG0.h:4612:8: error: ‘void filterformtetrahedrondg0_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘override’, but does not override
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronDG0.h: In member function ‘virtual ufc::cell_integral* filterformtetrahedrondg0_form_0::create_cell_integral(std::size_t) const’:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronDG0.h:4848:63: error: invalid new-expression of abstract class type ‘filterformtetrahedrondg0_cell_integral_0_1’
4848 | return new filterformtetrahedrondg0_cell_integral_0_1();
| ^
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronDG0.h:4592:7: note: because the following virtual functions are pure within ‘filterformtetrahedrondg0_cell_integral_0_1’:
4592 | class filterformtetrahedrondg0_cell_integral_0_1: public ufc::cell_integral
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dolfin/function/Expression.h:25,
from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:426:
/usr/lib/python3/dist-packages/ffc/backends/ufc/ufc.h:607:18: note: ‘virtual void ufc::cell_integral::tabulate_tensor(double*, const double* const*, const double*, int, std::size_t) const’
607 | virtual void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
In file included from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8847:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG1.h: At global scope:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG1.h:4116:8: error: ‘void filterformtetrahedroncg1_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
4116 | void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG1.h:4116:8: error: ‘void filterformtetrahedroncg1_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘override’, but does not override
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG1.h: In member function ‘virtual ufc::cell_integral* filterformtetrahedroncg1_form_0::create_cell_integral(std::size_t) const’:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG1.h:4366:63: error: invalid new-expression of abstract class type ‘filterformtetrahedroncg1_cell_integral_0_1’
4366 | return new filterformtetrahedroncg1_cell_integral_0_1();
| ^
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG1.h:4096:7: note: because the following virtual functions are pure within ‘filterformtetrahedroncg1_cell_integral_0_1’:
4096 | class filterformtetrahedroncg1_cell_integral_0_1: public ufc::cell_integral
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dolfin/function/Expression.h:25,
from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:426:
/usr/lib/python3/dist-packages/ffc/backends/ufc/ufc.h:607:18: note: ‘virtual void ufc::cell_integral::tabulate_tensor(double*, const double* const*, const double*, int, std::size_t) const’
607 | virtual void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
In file included from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:8848:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG2.h: At global scope:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG2.h:4116:8: error: ‘void filterformtetrahedroncg2_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
4116 | void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG2.h:4116:8: error: ‘void filterformtetrahedroncg2_cell_integral_0_1::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘override’, but does not override
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG2.h: In member function ‘virtual ufc::cell_integral* filterformtetrahedroncg2_form_0::create_cell_integral(std::size_t) const’:
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG2.h:4366:63: error: invalid new-expression of abstract class type ‘filterformtetrahedroncg2_cell_integral_0_1’
4366 | return new filterformtetrahedroncg2_cell_integral_0_1();
| ^
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/Filter/FilterFormTetrahedronCG2.h:4096:7: note: because the following virtual functions are pure within ‘filterformtetrahedroncg2_cell_integral_0_1’:
4096 | class filterformtetrahedroncg2_cell_integral_0_1: public ufc::cell_integral
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dolfin/function/Expression.h:25,
from /tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:426:
/usr/lib/python3/dist-packages/ffc/backends/ufc/ufc.h:607:18: note: ‘virtual void ufc::cell_integral::tabulate_tensor(double*, const double* const*, const double*, int, std::size_t) const’
607 | virtual void tabulate_tensor(double * A,
| ^~~~~~~~~~~~~~~
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp: In lambda function:
/tmp/tmp4wa23a1g/dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f.cpp:9318:4: warning: control reaches end of non-void function [-Wreturn-type]
9318 | }))
| ^

------------------- End compiler output ------------------------
Compilation failed! Sources, command, and errors have been written to: /home/nanand/source/FEniCSLab_Arthur/work/cylinder_cross_flow/jitfailure-dolfin_cpp_module_1b6a5de17bcd8bde62970d7c62135a7f
/home/nanand/source/FEniCSLab_Arthur/fenicslab/filters/init.py:6: UserWarning: filters/Filter/BoxFilterWindow/BoxAverage/CompiledDoubleBoxAverage not installed
warnings.warn(“filters/Filter/BoxFilterWindow/BoxAverage/CompiledDoubleBoxAverage not installed”)
/home/nanand/source/FEniCSLab_Arthur/fenicslab/fenicstools/init.py:7: UserWarning: Probe/Probes/StatisticsProbe/StatisticsProbes not installed
warnings.warn(“Probe/Probes/StatisticsProbe/StatisticsProbes not installed”)
/home/nanand/source/FEniCSLab_Arthur/fenicslab/fenicstools/init.py:13: UserWarning: interpolate_nonmatching_mesh/interpolate_nonmatching_mesh_any not installed
warnings.warn(“interpolate_nonmatching_mesh/interpolate_nonmatching_mesh_any not installed”)
Traceback (most recent call last):
File “solveCasedef.py”, line 6, in
from generateCasedef import mycasedef
File “/home/nanand/source/FEniCSLab_Arthur/work/cylinder_cross_flow/generateCasedef.py”, line 10, in
from fenicslab.common.distributions import nu_expression
File “/home/nanand/source/FEniCSLab_Arthur/fenicslab/common/distributions.py”, line 52, in
nu_expression = compile_cpp_code(viscositycode).Viscosity()
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/jit/pybind11jit.py”, line 95, in compile_cpp_code
module, signature = dijitso_jit(cpp_code, module_name, params,
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/jit/jit.py”, line 50, in mpi_jit
return local_jit(*args, **kwargs)
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/jit/jit.py”, line 106, in dijitso_jit
return dijitso.jit(*args, **kwargs)
File “/usr/lib/python3/dist-packages/dijitso/jit.py”, line 153, in jit
lib = lookup_lib(signature, cache_params)
File “/usr/lib/python3/dist-packages/dijitso/cache.py”, line 391, in lookup_lib
lib = load_library(lib_signature, cache_params)
File “/usr/lib/python3/dist-packages/dijitso/cache.py”, line 363, in load_library
lib = import(signature)
ImportError: libpetsc.so.3.11: cannot open shared object file: No such file or directory`

I have eigen installed, also the libpetsc.so.3.11 is available in the dist-package/petsc/ folder. So I am a bit lost so as to what is actually going wrong.

Obviosuly, I have done this already…

sudo apt-get install --no-install-recommends software-properties-common sudo add-apt-repository ppa:fenics-packages/fenics sudo apt-get update sudo apt-get install --no-install-recommends fenics
Any lead will be appreciated @dparsons !