Compiling precice on opensuse leap

Hi,
lately I have been trying to compile precice on Opensuse Leap 15.4. Up to now I managed to compile, but some tests fail. Here is the procedure I followed:

general prerequisites

MPI:

installed in /usr/lib64/mpi/gcc/mpich (via YaST) not found in the path (which mpicc: not found)

Packages:

  • mpich (version 4.0.1)
  • mpich-devel
  • mpich-gnu-hpc
  • mpich_4_0_1-gnu-hpc

PETSc:

The repo has PETSc 3.14.5 but it is not installable as depends on libopenblas=0.3.13, while 0.3.20 is installed and it gives a warning
So I cloned and compile petsc:

  • git clone -b release PETSc / petsc · GitLab petsc

  • set environment variables in .bashrc:

    export PETSC_DIR=“/home/claudio/Projects/petsc”
    export PETSC_ARCH=“arch-linux-c-debug”
    ./configure --with-mpi-dir=/usr/lib64/mpi/gcc/mpich
    make PETSC_DIR=/home/claudio/Projects/petsc PETSC_ARCH=arch-linux-c-debug all
    make PETSC_DIR=/home/claudio/Projects/petsc PETSC_ARCH=arch-linux-c-debug check

EIGEN:

eigen3-devel from YaST

BOOST: (>=1.71.0)

the following are required:

  • boost_log
  • boost_log_setup
  • boost_thread
  • boost_system
  • boost_filesystem
  • boost_program_options
  • boost_unit_test_framework

I followed the command suggested on the precice website:
sudo zypper install libboost_log1_75_0-devel libboost_thread1_75_0-devel libboost_system1_75_0-devel libboost_filesystem1_75_0-devel libboost_program_options1_75_0-devel libboost_test1_75_0-devel

LIBXML2:

libxml2-2 libxml2-devel libxml2-tools from YaST

PYTHON:

python3 python3-devel python3-numpy python3-numpy-devel (from YaST)

1) clone the repo

wget https://github.com/precice/precice/archive/v2.5.0.tar.gz

tar -xzvf v2.5.0.tar.gz

cd precice-2.5.0

2) compile

mkdir build
cd build
cmake …
make -j(n)

I got the following warnings:

/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: warning: libicui18n.so.suse65.1, needed by /usr/lib64/libboost_regex.so.1.75.0, may conflict with libicui18n.so.69

/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: warning: libicuuc.so.suse65.1, needed by /usr/lib64/libboost_regex.so.1.75.0, may conflict with libicuuc.so.69

/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: warning: libicudata.so.suse65.1, needed by /usr/lib64/libicuuc.so.suse65.1, may conflict with libicudata.so.69

3) test

The complilation runs without errors.

The following tests FAILED:

  1 - precice.acceleration (Failed)
  4 - precice.com.mpiports (Failed)
  8 - precice.m2n.mpiports (Failed)
 10 - precice.mapping.petrbf (Timeout)
 19 - precice.integration.Parallel (Failed)
 20 - precice.integration.Serial (Failed)

I am also attaching the log of the tests LastTest.log (420.5 KB)

If you see any errors or better procedures please let me know.
Claudio

Hi @Claudio,

I don’t know what the issue is, but I also faced issues with MPI and PETSc while trying to write the instructions you found on the website: Building from source - Dependencies | preCICE - The Coupling Library

I suspect that the issue is related to MPI. I would start by disabling PETSc (but keeping MPI enabled) to only focus on one part of the problem. What happens then?

By the way, already the fact that you get mpicc: not found is strange. What MPI binaries do you have installed? Please check that all of them come from the same MPI version (e.g., mpirun --version, with the compiler wrapper it is more complicated).

If you managed to solve this on your system, it would be very useful to contribute to the respective website section.

Hi @Makis ,
thanks for your answer. I am following the steps that you suggest, trying to compile first without PETSc and mainly to make MPI work. I’ll keep you updated in case I find a suitable procedure.
Claudio

Hi,
after some tests, this is the procedure I found to compile preCICE on opensuse, In the end, as @Makis
said, it all boiled down to the right version of MPI and how to source it. 'll recap it here just in case.

general prerequisites

MPI:

install openmpi:
sudo zypper install: openmpi-devel

and add to .bashrc:

export PATH=/usr/lib64/mpi/gcc/openmpi/bin/:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/mpi/gcc/openmpi/lib64/

PETSc:

  • git clone -b release PETSc / petsc · GitLab petsc

  • set environment variables in .bashrc:

    export PETSC_DIR=“/home/claudio/Projects/petsc”
    export PETSC_ARCH=“arch-linux-c-debug”
    ./configure
    make PETSC_DIR=/home/claudio/Projects/petsc PETSC_ARCH=arch-linux-c-debug all
    make PETSC_DIR=/home/claudio/Projects/petsc PETSC_ARCH=arch-linux-c-debug check

EIGEN:

eigen3-devel from YaST

BOOST: (>=1.71.0)

the following are required:

  • boost_log
  • boost_log_setup
  • boost_thread
  • boost_system
  • boost_filesystem
  • boost_program_options
  • boost_unit_test_framework

I followed the command suggested on the precice website:
sudo zypper install libboost_log1_75_0-devel libboost_thread1_75_0-devel libboost_system1_75_0-devel libboost_filesystem1_75_0-devel libboost_program_options1_75_0-devel libboost_test1_75_0-devel

LIBXML2:

libxml2-2 libxml2-devel libxml2-tools from YaST

PYTHON:

python3 python3-devel python3-numpy python3-numpy-devel (from YaST)

1) clone the repo

wget https://github.com/precice/precice/archive/v2.5.0.tar.gz

tar -xzvf v2.5.0.tar.gz

cd precice-2.5.0

2) compile

mkdir build
cd build
cmake …
make -j(n)

3) test

The compilation runs without errors.

All the tests PASS

1 Like

Thank you very much, @Claudio! I added a link to this post on our documentation, but would you please also be able to edit the page directly with your suggested changes? That would make your very helpful insights more visible.