Wells-Group / asimov-contact

Contact models for ASiMoV
MIT License
10 stars 4 forks source link

Errors while running asimov-contact demos #168

Open MoisesGresve opened 6 months ago

MoisesGresve commented 6 months ago

Hello, recently I was using the asimov-contact repository without any issues, but due to an error on my computer, I had to perform a fresh installation. Unfortunately, it's not working as before, and it's generating the following errors when running the demos.

code demo_nitsche_unbiased image

This is running on WSL in an environment. Below are the installation steps in case I've made any mistakes.

Create and activate the conda environment

sudo apt-get update conda create -n contact conda activate contact

Install packages

conda install -c conda-forge fenics-dolfinx mpich pyvista conda install -c conda-forge pybind11 conda install -c conda-forge cmake conda install -c conda-forge pocl conda install -c conda-forge oclgrind conda install -c conda-forge intel-compute-runtime conda install -c conda-forge beignet conda install -c conda-forge ocl-icd-system conda install -c conda-forge scipy pip install pytest conda update pip conda update setuptools python3 -m pip install numpy pip install gmsh

Clone and build the git repository

git clone https://github.com/Wells-Group/asimov-contact.git cd asimov-contact/cpp mkdir build cd build

Set environment variables for the compiler

export CC=/usr/bin/gcc export CXX=/usr/bin/g++

Configure with cmake and specify the conda installation prefix

cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..

Build and install

make -j4 make install

Install the Python package

cd ../../python python3 -m pip install -v .

Verify the installation

conda list

MoisesGresve commented 6 months ago

These steps worked for me now. sudo apt-get update conda create -n contact conda activate contact

conda install -c conda-forge fenics-dolfinx conda install -c conda-forge mpich conda install -c conda-forge pyvista

conda install -c conda-forge pybind11 conda install -c conda-forge cmake

conda update pip conda update setuptools

conda install -c conda-forge oclgrind ocl-icd-system

python3 -m pip install numpy pip install gmsh

sudo apt-get install librdmacm1 sudo apt install libxinerama1 sudo apt install libxft2 sudo apt install libxcursor1 sudo apt install libgl1-mesa-glx sudo apt install libglu1

git clone https://github.com/Wells-Group/asimov-contact.git cd asimov-contact/cpp mkdir build cd build

cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..

make -j4 make install

cd ../../python python3 -m pip install -v .

conda install -c conda-forge scipy