Ceres and Windows -> vcpkg

157 views
Skip to first unread message

Giuseppe Trapani

unread,
Oct 15, 2017, 10:47:00 AM10/15/17
to Ceres Solver
Hello everyone!

I just want to chime in for all the Windows users who need some easy way to get Ceres up and running. 

It turns out that Microsoft and the GitHub community developed this very tool that allows one to set up ceres (and many other packages) on Windows and readily make them available in Visual Studio. You can build ceres and all the dependencies for x64, x86, release, debug etc. 

I used the tool to get ceres in my Visual Studio and obtained identical performances between Visual Studio 2017 MSVC 15 and Windows Linux Subsystem GCC.

I just compiled everything out of the box without any customization and the all the tests were succesful n Windows 10. You can anyway customize whatever because vcpkg provides the CMakeLists.txt files for all the packages.

I will keep following this discussion in case anyone finds it useful and of course if anyone want to share particular customizations to improve the usage of ceres under Windows.


Keir Mierle

unread,
Oct 18, 2017, 7:15:06 PM10/18/17
to ceres-...@googlegroups.com
Hi Giuseppe,

This is great! Would you be willing to send a patch to update the Ceres docs with this technique? We don't have any Windows users in the core Ceres team, and so the Windows support isn't what we'd like it to be.

Thanks for the note,
Keir

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/8d225fdc-f901-4ca1-a755-5cfc95f72651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giuseppe Trapani

unread,
Oct 19, 2017, 2:13:12 PM10/19/17
to Ceres Solver
Of course I'll be very glad to do it! given all the support I'm receiving from you guys this is the least :)

I have no clue on how to do it since it's the first time but if you drop me a link or two I'll update the docs.


On Thursday, October 19, 2017 at 1:15:06 AM UTC+2, Keir Mierle wrote:
Hi Giuseppe,

This is great! Would you be willing to send a patch to update the Ceres docs with this technique? We don't have any Windows users in the core Ceres team, and so the Windows support isn't what we'd like it to be.

Thanks for the note,
Keir
On Sun, Oct 15, 2017 at 7:47 AM, 'Giuseppe Trapani' via Ceres Solver <ceres-...@googlegroups.com> wrote:
Hello everyone!

I just want to chime in for all the Windows users who need some easy way to get Ceres up and running. 

It turns out that Microsoft and the GitHub community developed this very tool that allows one to set up ceres (and many other packages) on Windows and readily make them available in Visual Studio. You can build ceres and all the dependencies for x64, x86, release, debug etc. 

I used the tool to get ceres in my Visual Studio and obtained identical performances between Visual Studio 2017 MSVC 15 and Windows Linux Subsystem GCC.

I just compiled everything out of the box without any customization and the all the tests were succesful n Windows 10. You can anyway customize whatever because vcpkg provides the CMakeLists.txt files for all the packages.

I will keep following this discussion in case anyone finds it useful and of course if anyone want to share particular customizations to improve the usage of ceres under Windows.


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.

Keir Mierle

unread,
Oct 19, 2017, 6:01:26 PM10/19/17
to ceres-...@googlegroups.com
Great!

Guidelines to submit to Ceres are here: http://ceres-solver.org/contributing.html

For the docs, take a look at http://ceres-solver.org/installation.html:
BUILD_DOCUMENTATION [Default: OFF]: Use this to enable building the documentation, requires Sphinx and the sphinx-better-theme package available from the Python package index. In addition, make ceres_docs can be used to build only the documentation.


To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/c009d77f-a0ee-4790-ad66-769f30462fc7%40googlegroups.com.

Adit

unread,
Dec 26, 2017, 11:59:20 AM12/26/17
to Ceres Solver
Hello Giuseppe,

Since you have success running ceres on Windows 10, may be you can help me with this issue. I have been using Ceres for over a year on Windows 7 with VS 2013 and had no issues. Just last week few of our machines are upgraded to Windows 10 and now Ceres solver crashes every time. My application works when the solver is not called but when it hits "Solve(options_smart, &problem, &summary);" the application crashes, an error stating heap corruption. Any thoughts? Below are few lines of my code relating to Ceres. Appreciate any help. Thanks.

Adit.

DEFINE_string(minimizer, "trust_region",
   "Minimizer type to use, choices are: line_search & trust_region");
Solver::Options options_smart;
   options_smart.trust_region_strategy_type = ceres::LEVENBERG_MARQUARDT;
   options_smart.max_num_iterations = 500;
   options_smart.linear_solver_type = ceres::DENSE_QR;
   options_smart.minimizer_progress_to_stdout = true;

   Problem problem;
   double a, b, c;
    for (int i = 0; i < logf.size(); ++i) {
         eqn_abc_t *eqn_abc_1 = new eqn_abc_t(logf[i], Zr[i]);
         problem.AddResidualBlock(new AutoDiffCostFunction<eqn_abc_t, 1, 1, 1, 1>(eqn_abc_1), NULL, &a, &b, &c);
         eqn_C2_abc_t *eqn_C2_abc_1 = new eqn_C2_abc_t(logf[i],ZC2[i]);        
         problem.AddResidualBlock(new AutoDiffCostFunction<eqn_C2_abc_t, 1, 1, 1, 1>(eqn_C2_abc_1), NULL, &a, &b, &c);
      }

      Solver::Summary summary;
      Solve(options_smart, &problem, &summary);

Reply all
Reply to author
Forward
0 new messages