How to install the mixed dimensional branch on Ubuntu

Hello
I am currently using 2019.1.0 version that I installed on Ubuntu using these commands:

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

Now I want to install the mixed-dimensional branch. The mixed dimensional features are not available on the version that I am using (For example MixedFunctionSpace).
For some reasons, I do not want to use docker and I want to install it on Ubuntu.
How can I upgrade my current version to have access to the mixed-dimensional branch?
Thanks

Hi Leo,
As from discussion from late last year, see here, it doesn’t seem that it is available as of now (?). If there is a docker file (somwhere?) then you could try to emulate those commands in a bash shell. It is certainly not on ppa yet. Though Cecile may be able to comment more on that.

Alternatively for running scripts using the mixed dimensional branch on a HPC cluster I pushed a container on Singularity here.

Cheers,
Bhavesh

1 Like

As most of @cdaversin’s branch is merged into dolfins master branch. You can download ufl, ffc, and dolfin’s master branches with git clone, and install them manually.

2 Likes

Thanks for your suggestions.
I created a folder on my Desktop and named it : 00FENICS. Then I followed the instruction for the Development version as mentioned here. I started by downloading the required packages by:

git clone https://bitbucket.org/fenics-project/fiat
git clone https://bitbucket.org/fenics-project/dijitso
git clone https://bitbucket.org/fenics-project/ufl
git clone https://bitbucket.org/fenics-project/ffc
git clone https://bitbucket.org/fenics-project/dolfin/branch/cecile/mixed-dimensional

So far so good. Then I tried to install them manually by typing:

cd fiat && pip3 install . && cd ..

But I am getting this error:

You can quite clearly see that you are already inside the Fiat folder…

Yes you are right. I had some issues with pip3 . I removed it and installed it again and I was able to pass 3 more steps successfully:

cd fiat    && pip3 install . && cd ..
cd dijitso && pip3 install . && cd ..
cd ufl     && pip3 install . && cd ..

However for installing FFC by typing: cd ffc && pip3 install . && cd ..
I am getting this error:

Please do pip3 list to check which version of fiat you have installed. When you run these commands, you should also do pip3 install . --upgrade as you already have installed these dependencies on your computer.

2 Likes

Thanks for your help. I upgraded my pip3 and then FFC was also installed correctly. I checked the versions of the packages by doing: pip3 list as you said:
cb

Based on the instruction I am trying to install the dolfin after installation of the packages by doing:

mkdir dolfin/build && cd dolfin/build && cmake .. && make install && cd ../..
Unfortunately there is another error:

1 Like

These are standard linux questions, which you should be able to debug yourself. First of all, check which folders you have in your current folder by doing ls. Do one and one command at the time, as && just means to one command after the other. Then you can easily navigate into the folder in question, make the build directory, build and install the C++ part of dolfin.

You might find it convenient to build the experimental future Ubuntu releases, currently available for Debian.
Clone the Debian FEniCS repos from https://salsa.debian.org/science-team/fenics (not instant, not dolfinx, ffcx), checkout the experimental branches in each, and build each using dpkg-buildpackage.

3 Likes

Thank you all for your suggestions. After struggling with this for a couple of hours finally I got to install it. I am sharing my experiences for anybody that may face the issues that I had.

  1. Make sure you have the stable version on your machine (2019.1.0).
  2. Upgrade these packages to the most recent versions :
  • boost
  • cmake
  • PETSC
  1. Make sure you have installed the Eigen3 package. If you do not have it, you can install it by:

    sudo apt install libeigen3-dev

  2. Just follow the instruction for the Development version here.

Finally, you can check the version of the dolfin by typing: dolfin-version in the terminal and you should receive: 2019.2.0.dev0
That was it!

2 Likes

Good to hear that you managed to install it successfully.
Just a clarification that could be useful for future installation : UFL and FIAT has been moved from Bitbucket to Github. This has not been updated (yet) in the installation documentation you mention, it should be :

git clone https://github.com/FEniCS/fiat.git
git clone https://github.com/FEniCS/ufl.git

For now the versions on Bitbucket and Github are equivalent so that won’t make a big difference, but just so you know future developments for these libraries will be make on Github.

3 Likes

Hi Leo,

Can you please let me know how to upgrade pip3? I am also stuck on the installing FFC step and getting the same error?

Thanks,
Ankit

Hello
I recommend to uninstall pip3 and install it again instead of upgrading. In order to uninstall it you can do:

sudo apt-get --purge autoremove python3-pip

Then install it again by:

sudo apt-get install python3-pip

I also suggest to remove the PETSC , boost and CMAKE, and install them again. This should resolve the issues.

1 Like

Dear Leo,

Thanks a lot for the instant reply.

For removing PETSC, boost and CMAKE and then reinstallation, can you also forward those commands?

Thanks,
Ankit

You can remove the cmake from the ubuntu software center. Regarding, PETSC and boost, you can simply google how to remove and install them again.

1 Like

Thank you, I will try that now.

Hi everyone,

I’m trying to install the development version following the instructions of @Leo. However, when I do:

mkdir dolfin/build && cd dolfin/build && cmake .. && make install && cd ../..

I get this error

-- The following REQUIRED packages have not been found:

 * UFC (required version >= 2019.2) , Unified language for form-compilers (part of FFC) , <https://bitbucket.org/fenics-project/ffc>

I’m guessing is a problem with the paths, but I’m not sure how to fix it. If I list the packages on pip3 I can see I have fenics-ffc install:
image

Thanks in advance!

I strongly advice you to use docker, as it makes everything simple to install. If not, please follow https://fenics.readthedocs.io/en/latest/installation.html#from-source, and install ufl,fiat and from github https://github.com/FEniCS and ffc from https://bitbucket.org/fenics-project/ffc/ using the master branches

1 Like

Hello,

How does one use the mixed-dimensional branch after installing it? For example, how can we use the MixedFunctionSpace function @Leo mentions in his original post? Do we need to import something special?

Thanks so much!