When using colmap or glomap mappers for bundle adjustment, you may see the error:
Requested to use GPU for bundle adjustment, but Ceres was compiled without cuDSS support. Falling back to CPU-based sparse solvers.
This is because Ceres 2.3 is not configured to use cuDSS. I want to share what steps I used to resolve this issue in Ubuntu 24.04.
Prerequisites:
Obviously you need to have cuda toolkit and cuDSS installed!
I used cuda toolkit 12.6.3 https://developer.nvidia.com/cuda-12-6-3-download-archive and cuDSS 0.5.0 https://developer.nvidia.com/cudss-downloads .
I am sure the version is not terribly important, and that newer minor versions will work. I just used nvidia's installation instructions listed on the download page.
You should have all the normal development packages. The apt packages listed in the colmap installation instructions are a super-set of what is needed https://colmap.github.io/install.html . I recommend using the nvidia site instructions and not using the nvidia-cuda-toolkit package.
sudo apt-get install \
git \
cmake \
ninja-build \
build-essential \
libboost-program-options-dev \
libboost-graph-dev \
libboost-system-dev \
libeigen3-dev \
libflann-dev \
libfreeimage-dev \
libmetis-dev \
libgoogle-glog-dev \
libgtest-dev \
libgmock-dev \
libsqlite3-dev \
libglew-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev \
libceres-dev
I used the Ubuntu 24.04 default gcc 13.3.0 . If you use a different cuda toolkit, you will need to use a compatible gcc version. That is the reason why the colmap install instructions instruct to use gcc 10 for Ubuntu 22, because Ubuntu 22 nvidia-cuda-toolkit defaults to a version that does not support gcc 11, which is the default gcc for Ubuntu 22.
Build Steps:
These are the build steps I followed. These steps assume that a global installation in /usr/local is acceptable.
If it is not, I would encourage using a package management solution like vcpkg.
You need to build ceres, colmap, and finally glomap from source.
ceres 2.3
git clone --recurse-submodules -j8 https://github.com/ceres-solver/ceres-solver
git checkout 46b4b3b002994ddb9d6fc72268c3e271243cd1df
cd ceres-solver
mkdir build
cd build
cmake ..
make -j 8
sudo make install
notes about ceres:
The output of the command "cmake .." should contain something like "found cudss". If it does not, then something has gone wrong,
and BA will not use the GPU. Go back through the other steps if you don't see this. You do not need to override the cudss_dir
cmake variable, the nvidia package will provide a cmake configuration file at /usr/lib/x86_64-linux-gnu/libcudss/12/cmake/cudss
that will allow cmake to find it. The ceres cmake configuration will attempt to find the package using the well supported
cmake path mechanism, if that isn't working you will want to figure out why so you don't have upstream configuration problems.
Also, ceres 2.3 is an unreleased development version. The commit used is the ~HEAD at time of writing. It is possible that future commits will work, but you cannot use commits before the 2.2 tag. The colmap and glomap code check the ceres version number.
colmap 3.11.1
git clone https://github.com/colmap/colmap.git
git checkout 682ea9ac4020a143047758739259b3ff04dabe8d
cd colmap
mkdir build
cd build
cmake .. -GNinja
ninja
sudo ninja install
glomap
git clone https://github.com/colmap/glomap.git
git checkout 262e122da0bedf2f48ec4735f84c93127862b2a1
cd glomap
mkdir build
cd build
cmake .. -GNinja
ninja
sudo ninja install
notes about glomap:
The checkout SHA is not very important, this is just ~HEAD and what I was successful with.
1.74.0
boost is installed from the apt package when adding dependencies listed on the colmap website
https://colmap.github.io/install.html