Hello,
I am trying to use the stable docker image of dolfinx to run code. I am new to docker and might be doing silly mistakes.
I create a new docker container using the following code :
docker run -ti -v $(pwd):/root/shared -w /root/shared dolfinx/dolfinx:stable
I now have two problems :
first, hello world python code works fine but as soon as I import dolfinx in python script I get the following error :
root@04eac6a484bc:~/shared# python3 ks.py
Abort(740937615): Fatal error in internal_Init_thread: Other MPI error, error stack:
internal_Init_thread(60).: MPI_Init_thread(argc=(nil), argv=(nil), required=3, provided=0x7ffd6abc56a0) failed
MPII_Init_thread(209)....:
MPID_Init(443)...........:
MPIDI_OFI_init_local(638):
create_vni_context(1020).:
create_vni_domain(1194)..: OFI fi_open domain failed (ofi_init.c:1194:create_vni_domain:Invalid argument)
Is this error linked to the “container settings” or to my host machine ?
Second :
Trying to install additional python packages doesn’t work and leads to this error
root@ead8ef7f6bb9:~# pip install torch
Collecting torch
Downloading torch-1.13.1-cp310-cp310-manylinux1_x86_64.whl (887.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/887.5 MB ? eta -:--:--ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
status = run_func(*args)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 339, in run
requirement_set = resolver.resolve(
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
result = self._result = resolver.resolve(
File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "/usr/lib/python3/dist-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
return bool(self._sequence)
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
return any(self)
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 288, in __init__
super().__init__(
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
self.dist = self._prepare()
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 299, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 532, in _prepare_linked_requirement
local_file = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 214, in unpack_url
file = get_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "/usr/lib/python3/dist-packages/pip/_internal/network/download.py", line 146, in __call__
for chunk in chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/cli/progress_bars.py", line 303, in _rich_progress_bar
with progress:
File "/usr/lib/python3/dist-packages/pip/_vendor/rich/progress.py", line 652, in __enter__
self.start()
File "/usr/lib/python3/dist-packages/pip/_vendor/rich/progress.py", line 643, in start
self.live.start(refresh=True)
File "/usr/lib/python3/dist-packages/pip/_vendor/rich/live.py", line 124, in start
self._refresh_thread.start()
File "/usr/lib/python3.10/threading.py", line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
Both errors seem to be linked to thread starting processes.
Has anyone been faced with similar problems?
Thanks in advance for your help.
Nicolas