Skip to content

Clang 13.0.0 MPI linking problems on TOSS3. #37

@rchen20

Description

@rchen20

Linking problems on TOSS3 when using llnl-toss3-clangX.cmake:

cmake -C ../host-configs/llnl-toss3-clang13.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CHAI=On -DENABLE_RAJA_PLUGIN=On -DDCHAI_ENABLE_RAJA_PLUGIN=On ..
make -j

[ 65%] Linking CXX executable bin/kripke.exe
/usr/tce/packages/cmake/cmake-3.14.5/bin/cmake -E cmake_link_script CMakeFiles/kripke.exe.dir/link.txt --verbose=1
/usr/tce/bin/clang++-13.0.0 -Wall -Wextra -O3 -ffast-math -Wl,-rpath -Wl,/usr/tce/packages/mvapich2/mvapich2-2.3-clang-13.0.0/lib -fopenmp=libomp CMakeFiles/kripke.exe.dir/src/kripke.cpp.o -o bin/kripke.exe lib/libchai.a lib/libkripke.a lib/libchai.a lib/libumpire.a lib/libRAJA.a -ldl
CMakeFiles/kripke.exe.dir/src/kripke.cpp.o: In function usage()': kripke.cpp:(.text+0x45): undefined reference to MPI_Comm_rank'
kripke.cpp:(.text+0x56): undefined reference to `MPI_Comm_size'

To get here, need to set the following variables in the cmake file (see https://llnl-blt.readthedocs.io/en/develop/tutorial/common_hpc_dependencies.html?highlight=blt_mpi_includes#mpi):

MPI_HOME
MPI_C_COMPILER
MPI_CXX_COMPILER
BLT_MPI_INCLUDES
BLT_MPI_LIBRARIES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions