Hi Community,
I want to install dolfinx_mpc
on a new high performance cluster. I tried using singularity, however, parallelization does not seem to work. I don’t know the reason for MPI not running correctly, but the problem might also be related to internal problems of the HPC.
Is there another convenient way to install dolfinx_mpc
on a cluster?
If you have installed DOLFINx, you only need to clone dolfinx_mpc, and use the commands listed in GitHub - jorgensd/dolfinx_mpc: Extension for dolfinx to handle multi-point constraints.
to install it on top of DOLFINx.
Unfortunately, I did not install DOLFINx yet. Is it possible to install DOLFINx using Spack and then to install dolfinx_mpc on top?
Yes, that should be possible.
As long as you install CMAKE and py-pip with spack alongside py-fenics-dolfinx you should be able to build dolfinx_mpc
I succesfully installed DOLFINx via spack and get for instance the output:
>>> dolfinx.__version__
'0.7.2'
Now I want to install dolfinx_mpc on top of that. I think that the compilers are properly set, e.g.
echo $CXX
xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/mpicxx
I cloned the github repository of dolfinx_mpc and used this command:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/ninja-1.11.1-vjvy7koypbf3l2vuvuil6apfce7rpvst/bin/ninja -B build-dir cpp/
The last output is
-- Configuring done (7.4s)
-- Generating done (0.1s)
-- Build files have been written to: xyz/dolfinx_mpc/build-dir
However, using the command
xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/ninja-1.11.1-vjvy7koypbf3l2vuvuil6apfce7rpvst/bin/ninja -j3 install -C build-dir
gives the following error message (I only included the first-one)
ninja: Entering directory `build-dir'
[1/8] Building CXX object CMakeFiles/dolfinx_mpc.dir/utils.cpp.o
FAILED: CMakeFiles/dolfinx_mpc.dir/utils.cpp.o
/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/mpicxx -DBOOST_TIMER_DYN_LINK -DBOOST_TIMER_NO_LIB -DDOLFINX_MPC_VERSION=\"0.7.0.0\" -DDOLFINX_VERSION=\"0.7.2\" -DHAS_PARMETIS -Ddolfinx_mpc_EXPORTS -I/xyz/dolfinx_mpc/cpp -I/xyz/dolfinx_mpc/cpp/dolfinx_mpc -isystem /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/include -isystem /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/._view/2fng3pxbhs6pljvhdzxhg22pubskbk3j/include -isystem xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/petsc-3.20.3-jfupqkjtee3mvbcoe45ja6gvzn2ritds/include -O3 -DNDEBUG -std=c++20 -fPIC -MD -MT CMakeFiles/dolfinx_mpc.dir/utils.cpp.o -MF CMakeFiles/dolfinx_mpc.dir/utils.cpp.o.d -o CMakeFiles/dolfinx_mpc.dir/utils.cpp.o -c /xyz/dolfinx_mpc/cpp/utils.cpp
In Datei, eingebunden von /xyz/dolfinx_mpc/cpp/utils.cpp:7:
/xyz/dolfinx_mpc/cpp/utils.h: In Funktion »dolfinx_mpc::mpc_data<T> dolfinx_mpc::distribute_ghost_data(std::span<const int>, std::span<const long int>, std::span<const T>, std::span<const int>, std::span<const int>, const dolfinx::common::IndexMap&, int)«:
/xyz/dolfinx_mpc/cpp/utils.h:734:28: Fehler: »create_sub_index_map« ist kein Element von »dolfinx::common«
734 | = dolfinx::common::create_sub_index_map(imap, blocks, false);
| ^~~~~~~~~~~~~~~~~~~~
Is it a problem that I installed dolfinx version 0.7.2 and that the github repository of dolfinx_mpc has version 0.7.0? And how can I change this? Or dou you have other suggestions what the problem is?
Thank you so much!
Did you checkout v0.7.2 of the dolfinx_mpc repo?
As what you are referring is on the main branch:
You are right! That solved at least this issue. I think that dolfinx_mpc is properly installed for C++.
Unfortunately, the python installation makes some trouble… I used this command
python3 -m pip -v install --config-settings=cmake.build-type="Release" --no-build-isolation ./python -U
and get the following error (in short form):
subprocess.CalledProcessError: Command '['cmake', '/xyz/dolfinx_mpc-0.7.2/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/xyz/dolfinx_mpc-0.7.2/python/build/lib.linux-x86_64-cpython-311/dolfinx_mpc', '-DPYTHON_EXECUTABLE=/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
...
Building wheel for dolfinx-mpc (setup.py) ... error
ERROR: Failed building wheel for dolfinx-mpc
...
Failed to build dolfinx-mpc
ERROR: Could not build wheels for dolfinx-mpc, which is required to install pyproject.toml-based projects
I think the problem might be related to the compilers that it does not recognize the required C and C++ compilers. What do you think? Do you have any suggestions?
Could you run the following:
python3 -m pip -v install --config-settings=cmake.build-type="Release" --no-build-isolation ./python -U --verbose
and also state the version of setuptools and pip installed on your cluster.
pip --version
pip 23.3.2 from /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pip (python 3.11)
python3 -m pip show setuptools
Name: setuptools
Version: 69.0.3
Running the command you suggested I get a similar error message (but I also tried to set the correct compiler pathes):
Using pip 23.3.2 from /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pip (python 3.11)
Non-user install because site-packages writeable
Created temporary directory: /tmp/pip-build-tracker-t51g7p4j
Initialized build tracking at /tmp/pip-build-tracker-t51g7p4j
Created build tracker: /tmp/pip-build-tracker-t51g7p4j
Entered build tracker: /tmp/pip-build-tracker-t51g7p4j
Created temporary directory: /tmp/pip-install-mec38bii
Created temporary directory: /tmp/pip-ephem-wheel-cache-9luvq2wp
Processing ./python
Added file:///xyz/dolfinx_mpc-0.7.2/python to build tracker '/tmp/pip-build-tracker-t51g7p4j'
DEPRECATION: Config settings are ignored for project file:///xyz/dolfinx_mpc-0.7.2/python. pip 24.0 will enforce this behaviour change. A possible replacement is to use --use-pep517 or add a pyproject.toml file to the project.
Running setup.py (path:/xyz/dolfinx_mpc-0.7.2/python/setup.py) egg_info for package from file:///xyz/dolfinx_mpc-0.7.2/python
Created temporary directory: /tmp/pip-pip-egg-info-6s9h1l7x
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info
writing /tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/SOURCES.txt'
writing manifest file '/tmp/pip-pip-egg-info-6s9h1l7x/dolfinx_mpc.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Source in ./python has version 0.7.2, which satisfies requirement dolfinx-mpc==0.7.2 from file:///xyzdolfinx_mpc-0.7.2/python
Removed dolfinx-mpc==0.7.2 from file:///xyz/dolfinx_mpc-0.7.2/python from build tracker '/tmp/pip-build-tracker-t51g7p4j'
Requirement already satisfied: numpy>=1.21 in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from dolfinx-mpc==0.7.2) (1.26.3)
Requirement already satisfied: fenics-dolfinx>=0.7.0 in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from dolfinx-mpc==0.7.2) (0.7.2)
Requirement already satisfied: cffi in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (1.15.1)
Requirement already satisfied: mpi4py in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (3.1.5)
Requirement already satisfied: petsc4py in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (3.20.2)
Requirement already satisfied: fenics-ffcx<0.8.0,>=0.7.0 in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (0.7.0)
Requirement already satisfied: fenics-ufl<2023.3.0,>=2023.2.0 in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (2023.2.0)
Requirement already satisfied: setuptools in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-ffcx<0.8.0,>=0.7.0->fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (69.0.3)
Requirement already satisfied: fenics-basix<0.8.0,>=0.7.0 in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from fenics-ffcx<0.8.0,>=0.7.0->fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (0.7.0)
Requirement already satisfied: pycparser in /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages (from cffi->fenics-dolfinx>=0.7.0->dolfinx-mpc==0.7.2) (2.21)
Created temporary directory: /tmp/pip-unpack-zv50mev7
Building wheels for collected packages: dolfinx-mpc
Created temporary directory: /tmp/pip-wheel-1mngstvh
Building wheel for dolfinx-mpc (setup.py) ... Destination directory: /tmp/pip-wheel-1mngstvh
Running command python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/problem.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/multipointconstraint.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/assemble_vector.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/__init__.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/dictcondition.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/assemble_matrix.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
creating build/lib.linux-x86_64-cpython-311/dolfinx_mpc/utils
copying dolfinx_mpc/utils/__init__.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/utils
copying dolfinx_mpc/utils/mpc_utils.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/utils
copying dolfinx_mpc/utils/test.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/utils
creating build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
copying dolfinx_mpc/numba/numba_setup.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
copying dolfinx_mpc/numba/assemble_vector.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
copying dolfinx_mpc/numba/__init__.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
copying dolfinx_mpc/numba/helpers.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
copying dolfinx_mpc/numba/assemble_matrix.py -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
copying dolfinx_mpc/py.typed -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc
copying dolfinx_mpc/utils/py.typed -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/utils
copying dolfinx_mpc/numba/py.typed -> build/lib.linux-x86_64-cpython-311/dolfinx_mpc/numba
running build_ext
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/mpicc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/mpicxx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pybind11/share/cmake/pybind11/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pybind11/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pybind11/share/cmake/pybind11/pybind11Common.cmake:188 (include)
/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pybind11/share/cmake/pybind11/pybind11Config.cmake:250 (include)
CMakeLists.txt:5 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PythonInterp: /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/python3 (found suitable version "3.11.6", minimum required is "3.6")
-- Found PythonLibs: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/python-3.11.6-2yjpfbwveg7xg57fpqcgj4bpb4qch67p/lib/libpython3.11.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pybind11/include (found version "2.11.1")
CMake Error at CMakeLists.txt:8 (find_package):
By not providing "FindDOLFINX_MPC.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"DOLFINX_MPC", but CMake did not find one.
Could not find a package configuration file provided by "DOLFINX_MPC" with
any of the following names:
DOLFINX_MPCConfig.cmake
dolfinx_mpc-config.cmake
Add the installation prefix of "DOLFINX_MPC" to CMAKE_PREFIX_PATH or set
"DOLFINX_MPC_DIR" to a directory containing one of the above files. If
"DOLFINX_MPC" provides a separate development package or SDK, be sure it
has been installed.
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/xyz/dolfinx_mpc-0.7.2/python/setup.py", line 85, in <module>
setup(name='dolfinx-mpc',
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run
self.run_command("build")
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
super().run_command(command)
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/xyz/dolfinx_mpc-0.7.2/python/setup.py", line 52, in run
self.build_extension(ext)
File "/xyz/dolfinx_mpc-0.7.2/python/setup.py", line 79, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args,
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/._view/2fng3pxbhs6pljvhdzxhg22pubskbk3j/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/xyz/dolfinx_mpc-0.7.2/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/xyz/dolfinx_mpc-0.7.2/python/build/lib.linux-x86_64-cpython-311/dolfinx_mpc', '-DPYTHON_EXECUTABLE=/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/python3', '-DCMAKE_C_COMPILER=/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/mpicc', '-DCMAKE_CXX_COMPILER=/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/mpicxx', '-DCMAKE_MAKE_PROGRAM=/xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/ninja-1.11.1-vjvy7koypbf3l2vuvuil6apfce7rpvst/bin/ninja', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/bin/python3 -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/xyz/dolfinx_mpc-0.7.2/python/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-1mngstvh
cwd: /xyz/dolfinx_mpc-0.7.2/python/
error
ERROR: Failed building wheel for dolfinx-mpc
Running setup.py clean for dolfinx-mpc
Running command python setup.py clean
running clean
removing 'build/temp.linux-x86_64-cpython-311' (and everything under it)
removing 'build/lib.linux-x86_64-cpython-311' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.11' does not exist -- can't clean it
removing 'build'
Failed to build dolfinx-mpc
ERROR: Could not build wheels for dolfinx-mpc, which is required to install pyproject.toml-based projects
Exception information:
Traceback (most recent call last):
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 429, in run
raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for dolfinx-mpc, which is required to install pyproject.toml-based projects
Remote version of pip: 23.3.2
Local version of pip: 23.3.2
Was pip installed by pip? True
Removed build tracker: '/tmp/pip-build-tracker-t51g7p4j'
So it doesn’t find the C++ installation. What was the output of the C++ build commands?
This was the output:
/xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/ninja-1.11.1-vjvy7koypbf3l2vuvuil6apfce7rpvst/bin/ninja -j3 install -C build-dir
ninja: Entering directory `build-dir'
[6/8] Linking CXX shared library libdolfinx_mpc.so.0.7.2.0
/usr/bin/ld: /software/rapids/r23.10/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/libgcc.a(_muldi3.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /software/rapids/r23.10/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/libgcc.a(_muldi3.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /software/rapids/r23.10/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/libgcc.a(_muldi3.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /software/rapids/r23.10/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/libgcc.a(_muldi3.o): unable to initialize decompress status for section .debug_info
[7/8] Install the project...
-- Install configuration: "Release"
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/dolfinx_mpc.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/assemble_utils.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/mpi_utils.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/ContactConstraint.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/utils.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/MultiPointConstraint.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/SlipConstraint.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/PeriodicConstraint.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/assemble_matrix.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/assemble_vector.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/lifting.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/include/dolfinx_mpc/mpc_helpers.h
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/lib64/libdolfinx_mpc.so.0.7.2.0
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/lib64/libdolfinx_mpc.so.0.7
-- Set runtime path of "/xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/lib64/libdolfinx_mpc.so.0.7.2.0" to "/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib64:/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/._view/2fng3pxbhs6pljvhdzxhg22pubskbk3j/lib:/xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/petsc-3.20.3-jfupqkjtee3mvbcoe45ja6gvzn2ritds/lib:/xyz/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib"
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/lib64/libdolfinx_mpc.so
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/share/dolfinx_mpc/DOLFINX_MPCTargets.cmake
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/share/dolfinx_mpc/DOLFINX_MPCTargets-release.cmake
-- Installing: /xyz/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/share/dolfinx_mpc/DOLFINX_MPCConfig.cmake
It works! Setting the CMAKE_PREFIX_PATH
to the correct path is the solution. Thank you very much!
Just one other question: I got an error when I tried to import the VTXWriter with
from dolfinx.io import VTXWriter
I think that this is probably the case because adios2
is not installed correctly. Is there any possibility to do this after the whole installation?
(python3 -m pip install adios2
did not help.)
No, you need to have installed ADIOS2 before DOLFINx (c++) as the code is c++ code.
You need to add a +adios2
to the dependency with spack when installing fenics-dolfinx
, see; Spack Packages
Thanks for the clarification!
How did you set the CMAKE_PREFIX_PATH? Could you share the specific path configuration? Thanks!
My CMAKE_PREFIX_PATH is something like /home/spack/opt/spack/linux-rhel8-sapphirerapids/gcc-12.2.0/py-fenics-dolfinx-0.7.2-h5yobmdzd4lob3fzil22i7my5d4zkbce/share/dolfinx_mpc/
.
I think you can type
spack location -i py-fenics-dolfinx
to find the location. Afterwards you need to append /share/dolfinx_mpc/
to this path.
Thank you very much I have successfully installed dolfinx-mpc.