MegviiRobot / MegBA

MegBA: A GPU-Based Distributed Library for Large-Scale Bundle Adjustment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem building on Windows

RamadanAhmed opened this issue · comments

Hi,
Thanks for this great contribution, I'm trying to build the repo on windows but I found out that NCCL is not supported on Windows system so I can't build it.
If there is a idea to build library for single gpu without support of NCCL and adding support to windows I would like to contribute for that

Hi,

Thanks for your comments, we have added a new compilation option (i.e. -DMEGBA_USE_NCCL) in #28. Check the new updated README.md. If you can help with the compilation on Windows, you can fork the repo and create the pull request. We are happy to involve you in MegBA.

Best regards,
Jie

That's great I will work on it on this weekend

Look forward to your good news :-)

Jie

I have finished and it build on windows but there is some major changes in CMakeLists.txt like:

  • Added installation and packaging using CPack
  • Used Target-based function instead of global ones (for ex. use target_include_directory instead include_directories)
  • Used find_package(CUDAToolKit) instead of deprecated find_package(CUDA)
  • Added CMakePresets to be easier to automate build and for continuous integration(GitHub/GitLab pipelines)

So Should the pull request be only on the windows part or all the changes that makes building on Windows and Linux consistent ?

Hi,

Nice job. What's the meaning of "building on Windows and Linux consistent", I guess it may be using the if-else statement in one "CMakeLists.txt" to judge the system and execute the relevant code. If so, I think making it consistent would be better.

Best regards,
Jie

I have made a pull request to explain what I managed to do so far, so I like to have you review it and if you have any comments I will try to solve them as I can.

there are some stuff remaining to be done because now it only builds static version of the library and if needed to be build as shared library we can do it in another pr

Hi,

I have merged your pull request. Nice job!

There are several problems in the building stage, check the newly opened pull request (#31). 1) cmake haves difficulty finding thrust, I added flag Thrust_DIR to fix it; 2) there is something wrong with the linking of gflags, I modified "examples/CMakeLists.txt"; 3) the header of Eigen3 is not included, I use "include_directories(${EIGEN3_INCLUDE_DIRS})" to fix it temperately. Please polish my pull request, thanks.

The problem of including Eigen happens when Eigen is installed by using "apt install libeigen3-dev". Since we want to make users do as less as possible, maybe using "git submodule" or "apt install" would be better.

Jie