Skip to content

link error: /usr/bin/ld: cannot find -lmpi #665

Open

Description

@elinx

Branch/Tag/Commit

main

Docker Image Version

GPU name

A100

CUDA Driver

Reproduced Steps

1. install mpi library to directory like `/opt/third_party/mpi` other than the default place(/usr/local/mpi)
2. build the project and the following error will happend:

cd /workspace/FasterTransformer/build/src/fastertransformer/triton_backend && /usr/local/lib/python3.8/dist-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/TransformerTritonBackend.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC  -std=c++17  -DWMMA -O3 -DNDEBUG -O3 -shared -Wl,-soname,libTransformerTritonBackend.so -o ../../../lib/libTransformerTritonBackend.so CMakeFiles/TransformerTritonBackend.dir/transformer_triton_backend.cpp.o   -L/usr/local/cuda/lib64  -L/usr/local/mpi/lib  -Wl,-rpath,/usr/local/cuda/lib64:/usr/local/mpi/lib ../../../lib/libnccl_utils.a ../../../lib/libmpi_utils.a -lmpi /usr/lib/x86_64-linux-gnu/libnccl.so ../../../lib/liblogger.a -lcudart 
/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make[2]: *** [src/fastertransformer/triton_backend/CMakeFiles/TransformerTritonBackend.dir/build.make:101: lib/libTransformerTritonBackend.so] Error 1
make[2]: Leaving directory '/workspace/FasterTransformer/build'
make[1]: *** [CMakeFiles/Makefile2:7062: src/fastertransformer/triton_backend/CMakeFiles/TransformerTritonBackend.dir/all] Error 2
make[1]: Leaving directory '/workspace/FasterTransformer/build'
make: *** [Makefile:136: all] Error 2

```[tasklist]
### Tasks

Activity

  1. added
    bug
    on Jun 13, 2023
  2. himarora commented on Jun 19, 2023

    @himarora

    Updating the correct path here worked for me

    list(APPEND COMMON_LIB_DIRS /usr/local/mpi/lib)

  3. himarora commented on Jun 21, 2023

    @himarora

    There's an open PR for this too: #612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions