Problems installing Asimov-Contact

Dear users,

I’m trying to install dolfinx-contact from the “GitHub - Wells-Group/asimov-contact: Contact models for ASiMoV” repository. The main branch seems to have some small typos (spdlog, etc), thus I’m trying to install the v0.9.0 branch.

First I compile the cpp sources from the cpp folder using the CMakeLists.txt provided with success (no errors). Secondly, I’m trying to compile the cpp sources in the “python” folder, but I get the following error when I run cmake using the CMakeLists.txt provided in this folder :
"CMake Error at CMakeLists.txt:40 (find_package):
Could not find a package configuration file provided by “DOLFINX_CONTACT”
with any of the following names:
DOLFINX_CONTACTConfig.cmake
dolfinx_contact-config.cmake
"
Clearly, the compiled library path is not recognized. I’ve already tried to include the folder where the file DOLFINX_CONTACTConfig.cmake is found via

list(APPEND CMAKE_PREFIX_PATH "/home/frocha/packages/asimov-contact-0.9.0/cpp/")

but with no sucess.

I know that this issue is more Cmake stuff, but could someone help me with some guidance on the steps necessary to compile rest of the library and to execute some test ?

Obs: there is no installation instructions in readme.

Hi @Felipe_Rocha,

I’ve not had the bandwidth to keep Asimov-contact up to date lately. I started a major refactoring last spring together with @garth (Code simplifications and tidying by garth-wells · Pull Request #182 · Wells-Group/asimov-contact · GitHub) but we didn’t have time to get the code all up to date with 0.9.0.

Hopefully I will have time to do this in the summer.

Hi @dokken,

No worries and thanks for your reply.
In anycase, regardless of the version and small bugs, it would be helpful to know the logic of compilation steps and linkings …

I’ve just had a look, and turns out that there isn’t that many things required to get it to compile with 0.9.0.
Currently I have a pull request: Make code compile with 0.9.0 by jorgensd · Pull Request #183 · Wells-Group/asimov-contact · GitHub
Let’s see if the checks pass
Some more work than expected, but the code is compiling. Need some more love and care to get all the tests to pass.

1 Like

@Felipe_Rocha
I’ve just pressed merge on a pull request that puts it up to date with 0.9.0 of DOLFINx. Give it half an hour-one hour, and the main branch (with installation instructions in the readme should work)

1 Like

Hi, sorry for my late response.
Does the CPP interface is needed for Python or Python interface compilation deals with everything needed for CPP?
I had problems with Ninja, is there another way of compiling the CPP?

I still have problems with the linking of the DOLFINX_CONTACT library when running python file installation script.
`Could not find a package configuration file provided by “DOLFINX_CONTACT”
with any of the following names:

  DOLFINX_CONTACTConfig.cmake
  dolfinx_contact-config.cmake

Add the installation prefix of "DOLFINX_CONTACT" to CMAKE_PREFIX_PATH or
set "DOLFINX_CONTACT_DIR" to a directory containing one of the above files.
If "DOLFINX_CONTACT" provides a separate development package or SDK, be
sure it has been installed.

`

You first need to build the C++ interface before installing the Python interface.
This can be done without ninja

cmake -B build-dir -S ./cpp
cmake --build build-dir --config Release
cmake --install build-dir --config Release