Skip to content

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

@elinx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions