I was able to access the container through Visual Studio Code to attach the application to the container and also to start shells with. So I got a clone from git of Basix, ffcx and dolfinx all of --branch v0.6.0.
I installed Basix following the instructions first for the cpp folder with cmake and then with pip. I installed ffcx per the instuctions only with pip. Upon attempting to compile with cmake dolfinx/cpp/build/cmake … I have found that:
CMake Error at CMakeLists.txt:356 (message):
No graph partitioner found. SCOTCH, ParMETIS or KaHIP is required.
which wasn’t really very understandable to me yet. I see talk of setting PETSc environment variables but not sure how that would relate to SCOTCH and ParMETIS. So far no issues are being reported to me about a missing PETSc dependency yet.
So I was curious is there some instructions so far on how to install SCOTCH and ParMETIS dependancies and/or find those dependancies on the system if they are installed someplace, for a docker container configuration?
So far when trying to run demo_elasticity.py from the git clone of dolfinx I have from the container’s terminal:
root@8631439e9191:~/dolfinx# /usr/bin/env /bin/python3 /root/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 60189 -- /root/dolfinx/python/demo/demo_elasticity.py
Traceback (most recent call last):
File "/root/dolfinx/python/demo/demo_elasticity.py", line 25, in <module>
from dolfinx import la
ModuleNotFoundError: No module named 'dolfinx'
root@8631439e9191:~/dolfinx#
So that is why I was compiling from source dolfinx and ran into the missing SCOTCH, ParMETIS missing dependencies situation…
Seems ParMETIS depends on GKlib. Also so far I didn’t finish building ParMETIS and installing because mpi.h is missing I would guess from the OpenMOU dependency…
a find -name “mpi.h” doesn’t seem to find anything for me yet… Is it possible I would have to install OpenMPI or am I maybe not knowing where to find it so I can add mpi.h to $PATH…
Its not clear to me why you have chosen to go down the tangential, and quite more challenging route of installing parmetis from source, when Ive explained to you how to Get the Pre-built image with scotch.
You also didn’t answer the question
So far it has been explained that there is a `dolfinx/dolfinx:stable to use with docker as far as I know. So upon pulling one with docker I had found that dolfinx scripts do not yet run out of the box so to speak (no module error). So that is reason for pulling a branch from git of dolfinx and seeing if it will compile and install inside the container as a way of getting the no module found to go away and scripts to run…
So far I found as far as installing the dependencies for a git pull of dolfinx that ParMETIS depends on GTKLib and OpenMPI. So far first two are fine to install OpenMPI 3.1 ending in not being found by a ~/dolfinx/cpp/build/cmake … but it did install. Along with OpenMPI 5 that turned out to be the wrong version for dolfinxv0.6.0.
As far as pulling a prebuilt from scratch I know how to pull a docker container from said stable branch but really don’t yet understand what is meant other than that…
Could you please add your full error message (stack trace), as I dont understand what you mean by this.
Please also add all commands that you are running, both to start the container and run code in it.
Also note that pyvista is only present in the dolfinx/lab:stable images, which you can run with docker run -ti --rm -v $(pwd):/root/shared --entrypoint="/bin/bash" dolfinx/lab:stable as shown in
So in terms of running this command:
docker run -ti dolfinx/dev-env:stable
and running in the terminal that appears for the root user I can call the command python3 and from the >> import dolfinx
which at first is a “No Module Found”.
After realizing this I tried to use spack as the gitub instructions say to. The resulting output appears from the terminal:
root@c413eada309c:~# cd /root ; /usr/bin/env /bin/python3 /root/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 40709 -- /root/Untitled-2.py
Traceback (most recent call last):
File "/root/Untitled-2.py", line 3, in <module>
from dolfinx import mesh, fem, plot, io, default_scalar_type
ImportError: cannot import name 'mesh' from 'dolfinx' (unknown location)
root@c413eada309c:~#
docker run -ti dolfinx/dolfinx:nightly does seem to come up OK. I maybe had a misunderstanding about usage of docker.