Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elinx opened this issue Jun 13, 2023 · 2 comments
Open

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

elinx opened this issue Jun 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@elinx
Copy link

elinx commented Jun 13, 2023

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
@elinx elinx added the bug Something isn't working label Jun 13, 2023
@himarora
Copy link

himarora commented Jun 19, 2023

Updating the correct path here worked for me

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

@himarora
Copy link

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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants