Once the conda-forge channel has been enabled, fenics-dolfinx, fenics-libdolfinx can be installed with conda:
conda install fenics-dolfinx fenics-libdolfinx
or with mamba:
mamba install fenics-dolfinx fenics-libdolfinx
It is possible to list all of the versions of fenics-dolfinx available on your platform with conda:
conda search fenics-dolfinx --channel conda-forge
or with mamba:
mamba search fenics-dolfinx --channel conda-forge
Alternatively, mamba repoquery may provide more information:
# Search all versions available on your platform:
mamba repoquery search fenics-dolfinx --channel conda-forge
# List packages depending on `fenics-dolfinx`:
mamba repoquery whoneeds fenics-dolfinx --channel conda-forge
# List dependencies of `fenics-dolfinx`:
mamba repoquery depends fenics-dolfinx --channel conda-forge
About conda-forge
conda-forge is a community-led conda channel of installable packages.
In order to provide high-quality builds, the process has been automated into the
conda-forge GitHub organization. The conda-forge organization contains one repository
for each of the installable packages. Such a repository is known as a feedstock.
A feedstock is made up of a conda recipe (the instructions on what and how to build
the package) and the necessary configurations for automatic building using freely
available continuous integration services. Thanks to the awesome service provided by
Azure, GitHub,
CircleCI, AppVeyor,
Drone, and TravisCI
it is possible to build and upload installable packages to the
conda-forgeanaconda.org
channel for Linux, Windows and OSX respectively.
To manage the continuous integration and simplify feedstock maintenance
conda-smithy has been developed.
Using the conda-forge.yml within this repository, it is possible to re-render all of
this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.
feedstock - the conda recipe (raw material), supporting scripts and CI configuration.
conda-smithy - the tool which helps orchestrate the feedstock.
Its primary use is in the construction of the CI .yml files
and simplify the management of many feedstocks.
conda-forge - the place where the feedstock and smithy live and work to
produce the finished article (built conda distributions)
Updating fenics-dolfinx-feedstock
If you would like to improve the fenics-dolfinx recipe or build a new
package version, please fork this repository and submit a PR. Upon submission,
your changes will be run on the appropriate platforms to give the reviewer an
opportunity to confirm that the changes result in a successful build. Once
merged, the recipe will be re-built and uploaded automatically to the
conda-forge channel, whereupon the built conda packages will be available for
everybody to install and use from the conda-forge channel.
Note that all branches in the conda-forge/fenics-dolfinx-feedstock are
immediately built and any created packages are uploaded, so PRs should be based
on branches in forks and branches in the main repository should only be used to
build distinct package versions.
In order to produce a uniquely identifiable distribution:
If the version of a package is not being increased, please add or increase
the build/number.
If the version of a package is being increased, please remember to return
the build/number
back to 0.
The only dependency I identified lacking ARM builds was slepc, which should get a PR from conda-forge/conda-forge-pinning-feedstock#2950 . Since petsc has arm builds, I expect the slepc PR to be similar
It seems that conda packages do not ship pkgconfig info for dolfinx:
Python 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:27:40) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dolfinx.pkgconfig
>>> print(dolfinx.pkgconfig.exists("dolfinx"))
False
>>> print(dolfinx.pkgconfig.parse("dolfinx"))
{'define_macros': [], 'include_dirs': [], 'library_dirs': [], 'libraries': []}
When building from source, I get instead
Python 3.10.9 (main, Dec 7 2022, 13:47:07) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dolfinx.pkgconfig
>>> print(dolfinx.pkgconfig.exists("dolfinx"))
True
>>> print(dolfinx.pkgconfig.parse("dolfinx"))
{'define_macros': ['DOLFINX_VERSION=0.6.0.0', 'DOLFINX_VERSION=0.6.0.0', 'HAS_SLEPC', 'HAS_PTSCOTCH', 'HAS_PARMETIS', 'PKG_BASIX_DEFINITIONS-NOTFOUND'], 'include_dirs': ['/home/francesco/opt/personal/gnu/install/fenicsx/2023-02-10-bb7ac95c0f/petsc-2022-07-25-2c78e79264-3.17.3-real/include', '/home/francesco/opt/personal/gnu/install/slepc/2022-07-25-0ba3c7aea-3.17.1/petsc-2022-07-25-2c78e79264-3.17.3-real/include', '/usr/include/hdf5/openmpi', '/home/francesco/opt/personal/gnu/install/petsc/2022-07-25-2c78e79264-3.17.3/real/opt/include', '/home/francesco/opt/personal/gnu/install/fenicsx/2023-02-10-bb7ac95c0f/petsc-2022-07-25-2c78e79264-3.17.3-real/lib/python3.10/site-packages/ffcx/codegeneration'], 'library_dirs': ['/home/francesco/opt/personal/gnu/install/slepc/2022-07-25-0ba3c7aea-3.17.1/petsc-2022-07-25-2c78e79264-3.17.3-real/lib', '/home/francesco/opt/personal/gnu/install/petsc/2022-07-25-2c78e79264-3.17.3/real/opt/lib', '/home/francesco/opt/personal/gnu/install/fenicsx/2023-02-10-bb7ac95c0f/petsc-2022-07-25-2c78e79264-3.17.3-real/lib'], 'libraries': ['slepc', 'petsc', 'boost_timer', 'dolfinx']}
The file responsible for the compilation of the C++ backend in the multiphenicsx repo is https://github.com/multiphenics/multiphenicsx/blob/b80f047c74827497ad6d1a689173d24e2e506974/multiphenicsx/cpp/compile_code.py
and I am actually surprised how multiphenicsx ever worked with dolfinx from conda, considering that without pkgconfig info multiphenicsx e.g. never links to petsc!
(my gut feeling is that, since multiphenicsx imports dolfinx and dolfinx imports dolfinx.cpp, then petsc and all other shared libraries are getting loaded by dolfinx.cpp in the python process, and this somehow defines symbols to be used afterwards also for multiphenicsx.cpp)
Please ping @hermanmakhm if tests on the actual conda environment need to be run, since I don't have access to it.
Solution to issue cannot be found in the documentation.
I checked the documentation.
Issue
There appears to be a problem in scotch on the mac-arm builds of scotch.
It's very likely this is not a dolfinx bug, but rather a bug in scotch and/or petsc, but saving here for tracking and discovery.
Running pytest unit/mesh/test_mesh_partitioners.py segfaults with
ERROR: SCOTCH_dgraphMapInit: internal error
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.
Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
Parititoning with parmetis and kahip both seem to work.
I'm not sure if I can disable scotch in the build so it will be unavailable instead of, since petsc is built with it.
Libdolfinx depends on adios2, which is currently only a python package. This means libdolfinx requires Python, missing much of the point of the split package. Adios2 should split into libadios2, then libdolfinx can depend on libadios2.
Question: does the Dolfinx Python then depend on the Adios2 Python?
due to certain problem i reinstalled ubuntu on a Virtual machine today, and unfortunately fenicsx has been updated last week on conda forge.
one of the script i try to understand and reproduce is not working anymore "Entity-to-cell connectivity has not been computed." i can't understand what i'm supposed to change to a program that was working.
is it possible to install in my conda env the previous version of fenicsx from like 2-3 weeks ago , i don't remeber which one was installed on conda forge previously, if you can tell me , Thx a lot
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 4 Illegal instruction: Likely due to memory corruption
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
I believe it has something to do with packages incompatibility. I've tried reinstalling anaconda from scratch, creating multiple clean environments, I always have the same issue.