llnl / llnl/smith

serac build mixes OpenMPI and MPICH when both are installed

Open
#787 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug build
Dominant language
C++
Stars
245
Forks
36
Avg merge
8d 23h
Merged PRs (30d)
4

Description

I have MPICH installed into ```/usr/local``` and OpenMPI installed into ```/usr/local/mpi/openmpi```.

When OpenMPI is selected through cmake options serac binaries are linked with both MPI libraries:
```
$ ldd -a work/stage/usr/local/bin/serac | more
/disk-samsung/freebsd-ports/science/serac/work/stage/usr/local/bin/serac:
libserac_physics.so => not found (0x200000)
libserac_coefficients.so => not found (0x200000)
libserac_physics_integrators.so => not found (0x200000)
libserac_physics_materials.so => not found (0x200000)
libserac_numerics.so => not found (0x200000)
libserac_boundary_conditions.so => not found (0x200000)
libserac_state.so => not found (0x200000)
libserac_mesh.so => not found (0x200000)
libserac_infrastructure.so => not found (0x200000)
libaxom.so => /usr/local/lib/libaxom.so (0x200000)
libconduit_relay_mpi_io.so => /usr/local/lib/libconduit_relay_mpi_io.so (0x200000)
libconduit_relay.so => /usr/local/lib/libconduit_relay.so (0x200000)
librt.so.1 => /usr/lib/librt.so.1 (0x200000)
libhdf5.so.200 => /usr/local/lib/libhdf5.so.200 (0x200000)
libsiloh5.so.0 => /usr/local/lib/libsiloh5.so.0 (0x200000)
libm.so.5 => /lib/libm.so.5 (0x200000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x200000)
libconduit_blueprint_mpi.so => /usr/local/lib/libconduit_blueprint_mpi.so (0x200000)
libconduit_blueprint.so => /usr/local/lib/libconduit_blueprint.so (0x200000)
libconduit_relay_mpi.so => /usr/local/lib/libconduit_relay_mpi.so (0x200000)
libconduit.so => /usr/local/lib/libconduit.so (0x200000)
liblua-5.4.so => /usr/local/lib/liblua-5.4.so (0x200000)
libmfem.so.4.4.0 => /usr/local/lib/libmfem.so.4.4.0 (0x200000)
libHYPRE.so => /usr/local/lib/libHYPRE.so (0x200000)
libmpicxx.so.12 => /usr/local/lib/libmpicxx.so.12 (0x200000)
libmpi.so.12 => /usr/local/lib/libmpi.so.12 (0x200000)
libmpi.so.40 => /usr/local/mpi/openmpi/lib/libmpi.so.40 (0x200000)
libmpi_cxx.so.40 => /usr/local/mpi/openmpi/lib/libmpi_cxx.so.40 (0x200000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x200000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x200000)
libgcc_s.so.1 => /usr/local/lib/gcc11/libgcc_s.so.1 (0x200000)
libthr.so.3 => /lib/libthr.so.3 (0x200000)
libc.so.7 => /lib/libc.so.7 (0x200000)
```

cmake arguments:
-DAXOM_DIR=/usr/local -DCONDUIT_DIR=/usr/local -DMFEM_DIR=/usr/local -DENABLE_MPI=ON -DMPI_C_COMPILER=/usr/local/mpi/openmpi/bin/mpicc -DMPI_CXX_COMPILER=/usr/local/mpi/openmpi/bin/mpicxx -DCMAKE_C_COMPILER:STRING="cc" -DCMAKE_CXX_COMPILER:STRING="c++" -DCMAKE_C_FLAGS:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing " -DCMAKE_C_FLAGS_DEBUG:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing " -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing " -DCMAKE_CXX_FLAGS:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer " -DCMAKE_CXX_FLAGS_DEBUG:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer " -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer " -DCMAKE_EXE_LINKER_FLAGS:STRING=" -fstack-protector-strong " -DCMAKE_MODULE_LINKER_FLAGS:STRING=" -fstack-protector-strong " -DCMAKE_SHARED_LINKER_FLAGS:STRING=" -fstack-protector-strong " -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" -DCMAKE_BUILD_TYPE:STRING="Release" -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_TESTS:BOOL=OFF -GNinja -DMPIEXEC_EXECUTABLE:FILEPATH="/usr/local/mpi/openmpi/bin/mpiexec" -DMPI_HOME:PATH="/usr/local/mpi/openmpi"

axom, for example, doesn't have such problem.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the posted CMake arguments while both MPICH and OpenMPI are installed, then inspect the generated link dependencies for serac and its libraries. Done means selecting /usr/local/mpi/openmpi results in binaries linked only against the OpenMPI libraries, without MPICH dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.