How to install FEniCS 2019.2.0.dev0 by conda?

Hello everyone, I am a newcomer to FEniCS.
I encountered serious version issues while learning FEniCS.

I studied FEniCS from a paper that is very important to me, which used the MeshView.create function.
The paper also used PyTorch, so I set up both FEniCS and PyTorch environments with conda.

However, it seems that the highest version of FEniCS supported by conda is only 2019.1.0, but the crucial MeshView.create appears to be in the 2019.2.0.dev0 version.
I have tried for a long time but found no way to upgrade FEniCS to 2019.2.0.dev0 version through the conda virtual environment.
Is there any feasible method?

By the way, I installed FEniCS in a non-virtual environment, and it supports MeshView.create in the 2019.2.0.dev0 version,
but I do not want to install too many dependencies in a non-virtual environment (there are many complex dependencies in the paper, including PyTorch).
Is there any way to install the 2019.2.0.dev0 version of FEniCS in a virtual environment? Preferably Conda, I need MeshView.create.

Any help would be greatly appreciated.
Best regards.

Hi. Welcome to the FEniCS community!.

Legacy development version of FEniCS is available in Anaconda

conda install -c conda-forge -c conda-forge/label/fenics-dev fenics-dolfin mpich

See, for instance Conda: mac-arm builds of legacy dolfin and development version available

Cheers.

@thomassuperlu666 do not post unrelated messages in someone else topic. Open a new topic instead.

Dear developer,

Thank you for your prompt reply. I used the command you provided, conda install -c conda-forge -c conda-forge/label/fenics-dev fenics-dolfin mpich, but I can still only install version 2019.1.0 of Fenics, even with a brand new virtual environment.

Therefore, I used the command conda search -c conda-forge fenics-dolfin --info and manually installed fenics-dolfin 2019.2.0.dev0 and its dependencies with conda install https://conda.anaconda.org/conda-forge/label/fenics-dev/linux-64/fenics-dolfin-2019.2.0.dev20240219-py39hfa0d945_0.conda. Finally, I was able to use the MeshView function.

However, there are two strange issues that are troubling me.
Issue 1: In the following code, my PyCharm IDE underlines self, x, on_boundary with a squiggly line and gives a warning that the signature of the method ‘InnerBoundary.inside()’ does not match the signature of the base method in class ‘SubDomain’. I want to find the usage of the base method inside, but PyCharm indicates that it cannot find usage in the project files. Nevertheless, the code runs without errors. As a beginner, I am deeply troubled by this.
class InnerBoundary(SubDomain):
def inside(self, x, on_boundary):
return on_boundary and near(sqrt(x[0] ** 2 + x[1] ** 2), R_in)

Issue 2: I am facing serious compatibility issues with my mshr installation. In my version of fenics-dolfin 2019.2.0.dev0, it seems incompatible with mshr version 2019.1.0, resulting in the error ImportError: libboost_filesystem.so.1.82.0: cannot open shared object file: No such file or directory. My versions of boost-cpp and libboost are 1.84.0, and installing a lower version of boost is not feasible, as fenics-dolfin 2019.2.0.dev0 requires libboost >=1.84.0,<1.85.0a0. If I use fenics version 2019.1.0 and install libboost version 1.78, mshr works, but then the MeshView function is not available.

As a beginner, I am facing numerous challenges. If you could assist me, I would be deeply grateful.

Best Regards.

Hi.

This warning is triggered by static code analysis tools to let you know that there might be an issue, as the original dispatch method has a different signature and because SubDomain is using *args and **kwargs internally. This doesn’t necessarily indicate an error, as you saw. You can ignore that warning.

Mshr has not been supported for quite some time, so its use is not recommended. Please use GMSH to generate the meshes. Meshio is pretty useful to import the meshes to FEniCS using the .xdmf format. There is a lot of posts dealing with that. For example: Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio - #263 by Devin, Gmsh 4.4.1 in FEniCS? Meshio - #9 by SantiagoOrtiz, How to import xdmf mesh generated by gmsh into fenics - #10 by dokken, among others.

Cheers.

BTW: I’m not a developer, just a community member trying to help.

Thank you for your reply.

I have given up on installing mshr in FEniCS 2019.2.0.dev0, although it worked well in 2019.1.0.

I still hope that others can successfully install a specific version of FEniCS, and if problems arise, they might have to resort to the tedious manual installation of dependencies. I hope others won’t encounter such issues.

Meanwhile, with your help, this code can perfectly eliminate the warning:

class InnerBoundary(SubDomain):
    def inside(self, *args):
        x, on_boundary = args
        return on_boundary and near(sqrt(x[0] ** 2 + x[1] ** 2), R_in)

Lastly, Thank you again, helpful community member :blush:! I believe my issue has been resolved.

Hi I’m struggling to install FEniCS 2019.2.0.dev0 into conda, runing in Ubuntu. I have followed all the directions and hints written in this post and I haven’t found a way, could you share your exact procedure to do it?

Best regards.

JPMS

If you are a new user you should probably start with DOLFINx rather than DOLFIN, as DOLFIN has not been developed further Since ~2019.
See:

for some context.

Note that a more scalable and less buggy version of MeshView is available in DOLFINx (codim 0 in v0.8.0, codim 1 on main and will be in v0.9.0).

Oh, sorry for not reply you in time.This is what I did. Can it helps you?

I know it’s late in the discussion and their interest in the topic have waned, but I’m curious… :thinking:

I tried to use the 2019.2.0.dev version in a conda environment, and after applying that command in a conda environment, I encountered a problem with dolfin import.
Did you have any problems with the import process?

You already replied to the pinned post, which is the best place to get help. Do not cross post your messages. Closing.

1 Like