I ran spack install and had a successful build finish at terminal. So upon done I ran a find -name “dolfinx.h” and found that there was nothing yet installed on the system. Upon finding that out I attempted to apt install cmake and build from source from the cpp/build directory of dolfinx by running “cmake …”
The first thing that happens is I get some red text out of terminal that says:
/usr/lib/x86_64-linux-gnu/openmpi/include
So I attempted to resolve this by copying ~/dolfinx/cpp/dolfinx the whole contents into /usr/include and then compiling the poisson example from the demo folder of dolfinx. Upon compiling I am finding that I still have a missing “poisson.h”. I did a search so far for a posson.h but did not yet find anything on the system.
Is there some additional step that should be necessary after running “spack install” at terminal to install onto the system a set of working source files for the dolfinx project into the source tree?
How might the missing poisson.h be resolved on Ubuntu 22.04?
OK. That was very helpful so far. Currently the difficulty with just using the cmake command on the …/cpp/demo folder of dolfinx is that cmake is asking for some missing configuration files in the form of:
the output was quite long, mostly it had indicated that all required packages were pulled and processed in some way successfully. “Spack” takes a little over one hour to complete the process.
which does seem to fix the missing OpenMPI includes however when attempting again to cmake the cpp folder of dolfinx I get a missing basix package just to start out with among some others which I am trying to install onto the system with sudo apt install’s.
Just a little bit more information after that (currently I have a versioning requirement issue installing ffcx manually):
prusso@lenovo:~/ffcx$ sudo cmake --install build-dir
-- Install configuration: ""
-- Installing: /usr/local/share/ufcx/cmake/ufcxTargets.cmake
-- Installing: /usr/local/share/ufcx/cmake/ufcxConfig.cmake
-- Installing: /usr/local/share/ufcx/cmake/ufcxConfigVersion.cmake
-- Installing: /usr/local/include/ufcx.h
-- Installing: /usr/local/share/pkgconfig/ufcx.pc
prusso@lenovo:~/ffcx$ pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /home/prusso/ffcx
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting cffi
Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 KB 7.4 MB/s eta 0:00:00
Collecting numpy
Downloading numpy-1.25.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.6/17.6 MB 33.4 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement fenics-ufl<2023.3.0,>=2023.2.0.dev0 (from fenics-ffcx) (from versions: 2017.1.0.post1, 2017.2.0, 2018.1.0, 2019.1.0, 2022.1.0.post0, 2022.2.0, 2023.1.0, 2023.1.1.post0)
ERROR: No matching distribution found for fenics-ufl<2023.3.0,>=2023.2.0.dev0
I would guess at this point that the UFL release requested just isn’t out yet. It seems that OpenMPI was put in by spack so far it was only the C++ header files that were missing that were installed with apt.
As you are trying to run the C++ installation of DOLFINx, I would install fenics-dolfinx and not py-fenics-dolfinx, as the latter are the Python bindings of dolfinx, Ref: Package List — Spack 0.21.0.dev0 documentation
fenics
fenicsx
(also a smattering of packages for dolfin and python-dolfin*)
So after apt install fenicsx which is the closest I have to fenics-dolfinx and also trying to build the cpp again what I have showing up is that I have an unsuitable version of UFCx (0.5.0 vs 0.7 that cmake is asking for).
I would imagine that at this time I may or may not be able to get a version 0.7, I guess that I will maybe just wait for it to come down the pipeline. Any opines about the availability currently of 0.7 it is asking are welcome. Thanks… looks really like what I was searching for in the way of PDE solving capabilities.
You are now mixing apt installation and spack installations, which is not what you want. You started using spack, but you installed the python interface (which doesn’t have the c++ code as a runtime dependency). this is why you should call your spack installation with
prusso@lenovo:~/dolfinx/cpp/build$ cmake ..
-- Found Boost 1.82.0 at /home/prusso/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/cmake/Boost-1.82.0
-- Requested configuration: QUIET REQUIRED COMPONENTS timer
-- Found boost_headers 1.82.0 at /home/prusso/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/cmake/boost_headers-1.82.0
~~~~
-- Checking for basix hints with /usr/bin/python3.10
CMake Error at CMakeLists.txt:195 (find_package):
Could not find a configuration file for package "Basix" that is compatible
with requested version "0.7".
The following configuration files were considered but not accepted:
/home/prusso/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/cmake/basix/BasixConfig.cmake, version: 0.6.0
-- Configuring incomplete, errors occurred!
See also "/home/prusso/dolfinx/cpp/build/CMakeFiles/CMakeOutput.log".
So there is still currently in that configuration of a ‘spack’ installation a version mismatch that occurs when building for c++ with ‘cmake’…
So currently at this time there are (preferred and safe):
Preferred version:
0.6.0 https://github.com/FEniCS/ffcx/archive/v0.6.0.tar.gz
Safe versions:
main [git] https://github.com/FEniCS/ffcx.git on branch main
0.6.0 https://github.com/FEniCS/ffcx/archive/v0.6.0.tar.gz
0.5.0.post0 https://github.com/FEniCS/ffcx/archive/v0.5.0.post0.tar.gz
0.5.0 https://github.com/FEniCS/ffcx/archive/v0.5.0.tar.gz
0.4.2 https://github.com/FEniCS/ffcx/archive/v0.4.2.tar.gz
I did give a go to put in 0.70. This was result:
prusso@lenovo:~/dolfinx/cpp/build$ spack install --add fenics-dolfinx@0.70
==> Error: concretization failed for the following reasons:
1. Cannot satisfy 'fenics-dolfinx@0.70'. Couldn't concretize without changing the existing environment. If you are ok with changing it, try `spack concretize --force`. You could consider setting `concretizer:unify` to `when_possible` or `false` to allow multiple versions of some packages.
Not really sure what it means all the way. I did try to re-concretize some way to see if that would remedy anything. Couldn’t get a 0.7 to go in yet…
main branch is showing safe by spack, 0.6.0 is showing preferred when completed. For discussion purposes I wget https://github.com/FEniCS/dolfinx/archive/v0.6.0.tar.gz and unpack it. spack is showing fenics-ufcx as installed 0.6.0 being preferred.
dolfinx-0.6.0/cpp/build$ cmake …
ModuleNotFoundError: No module named 'ffcx'
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find UFCx (missing: UFCX_INCLUDE_DIRS UFCX_VERSION) (Required is
at least version "0.6")
Reason given by package: UFCx could not be found.
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindUFCx.cmake:72 (find_package_handle_standard_args)
CMakeLists.txt:260 (find_package)
So it seems in this particular case 0.6.0 is installed but not found of UFCx.
So when compiling main branch the problem is that 0.7.0 is not found and maybe not installed of UFCx