exhaustive_matcher with use_gpu false: 'Check failed: num_cuda_devices > 0 (0 vs. 0)'

1,319 views
Skip to first unread message

douglasg...@gmail.com

unread,
Mar 13, 2018, 8:44:14 AM3/13/18
to COLMAP
Hi,

I have built colmap successfully on an HPC cluster without a GPU and am prepared to (a) wait :-) and (b) use pmvs2 for dense reconstruction.

I have run feature_extractor successfully:

$ colmap feature_extractor --database_path $PWD/trial.db --image_path $PWD/images/ --SiftExtraction.num_thread 8 --SiftExtraction.use_gpu 0

but when I get to exhaustive_matcher, it fails apparently checking for a GPU when I've asked it not to use one (using false for use_gpu doesn't change the outcome):

$ colmap exhaustive_matcher --database_path $PWD/trial.db --SiftMatching.num_threads 8 --SiftMatching.use_gpu 0
F0313 13:35:24.440341 18815 matching.cc:605] Check failed: num_cuda_devices > 0 (0 vs. 0)
*** Check failure stack trace: ***
    @           0xda8db0  google::LogMessage::Fail()
    @           0xda8d0d  google::LogMessage::SendToLog()
    @           0xda8671  google::LogMessage::Flush()
    @           0xdab750  google::LogMessageFatal::~LogMessageFatal()
    @           0x75e65d  colmap::SiftFeatureMatcher::SiftFeatureMatcher()
    @           0x75e8d0  colmap::ExhaustiveFeatureMatcher::ExhaustiveFeatureMatcher()
    @           0x59fe87  RunExhaustiveMatcher()
    @           0x58ab83  main
    @     0x2ae3587cbc05  __libc_start_main
    @           0x591637  (unknown)
    @              (nil)  (unknown)
Aborted (core dumped)


Any advice ?

Best,

Douglas

douglasg...@gmail.com

unread,
Mar 13, 2018, 8:49:05 AM3/13/18
to COLMAP
I should add that cmake produced the following during the build configuration:

...
-- Found Threads: TRUE
-- Found Qt 5.6.2
-- Build type not specified, using Release
-- Enabling OpenMP support
-- Disabling interprocedural optimization
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;7.0;7.0+PTX
-- Enabling CUDA support (version: 9.1, archs: sm_30 sm_35 sm_50 sm_52 sm_60 sm_61 sm_70 compute_70)
-- Enabling OpenGL support
-- Disabling profiling support
-- Configuring done
-- Generating done
-- Build files have been written to: ...

Johannes Schönberger

unread,
Mar 13, 2018, 9:04:23 AM3/13/18
to COLMAP
Hi,

Interestingly, you do have a CUDA compiler but no available GPU. :-)

In any case, can you change src/feature/matching.cc L605 to:

if (options_.use_gpu && gpu_indices.size() == 1 && gpu_indices[0] == -1) {

and report back whether that fixes the problem?

Thanks,
Johannes
> --
> You received this message because you are subscribed to the Google Groups "COLMAP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to colmap+un...@googlegroups.com.
> To post to this group, send email to col...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/6e95856f-f42e-4d0e-8d33-44c51df6d1bf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

douglasg...@gmail.com

unread,
Mar 13, 2018, 9:49:48 AM3/13/18
to COLMAP
Hi,

Yes that's curious isn't it?  A legacy, I think, of having a few nodes with GPUs in the past, since removed.

I've made that change to src/feature/matching.cc line 603 and it passed through and is now exhaustively matching.

Thanks for the quick and useful reply!

Best,

Douglas

Johannes Schönberger

unread,
Mar 13, 2018, 10:22:14 AM3/13/18
to COLMAP
Great, the fix is now also committed to the dev branch on Github.

Thanks for the bug report.
> To view this discussion on the web visit https://groups.google.com/d/msgid/colmap/63e43dc3-ca42-471f-93bc-7d921e3eef5c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages