Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Build Multiverso with mvapich2 (replacement of OpenMPI) in CNTK #139

Closed
junjieqian opened this issue Jan 18, 2017 · 3 comments
Closed

Build Multiverso with mvapich2 (replacement of OpenMPI) in CNTK #139

junjieqian opened this issue Jan 18, 2017 · 3 comments

Comments

@junjieqian
Copy link

I would like to build multiverse with mvapich2, and my CMAKE command is like cmake -DCMAKE_VERBOSE_MAKEFILE=TRUE -DMPI_CXX_INCLUDE_PATH=/usr/local/mvapich2-2.2/include -DMPI_CXX_LIBRARIES=/usr/local/mvapich2-2.2 -DMPI_LIBRARY=/usr/local/mvapich2-2.2 -.... It passes the source build, but fails the Test build with error as:
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Barrier'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Iprobe' /cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Get_count'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Isend' /cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Initialized'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Allreduce' /cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Comm_size'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Init_thread' /cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Query_thread'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Wait' /cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Recv'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Comm_rank' /cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Finalize'
/cntk/build/gpu/release/lib/libmultiverso.so: undefined reference to MPI_Testall' .

Any suggestions on this? Thank you.

@junjieqian junjieqian changed the title Build Multiverso with mvapich2 in CNTK Build Multiverso with mvapich2 (replacement of OpenMPI) in CNTK Jan 18, 2017
@feiga
Copy link
Contributor

feiga commented Jan 18, 2017

We haven't tried with MVAPICH2. But by looking at the errors, it seems that the linker can't find the MPI dynamic library. Note that the pass of source build is because the target of Multiverso source is just a .so file, which doesn't link the MPI library. So the error occurs when you bulid test and generate the binary. I would suggest you check the path of the mpi library to make sure the program can find the path.

@feiga
Copy link
Contributor

feiga commented Feb 27, 2017

Could you try with cmake -DCMAKE_CXX_COMPILER=/path/to/mpi/bin/mpic++ .. ? I just tried and it works.

@junjieqian
Copy link
Author

Thank you @feiga, it solves our problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants