Ceres Solver Version 1.14.0 Release Candidate 1

500 views
Skip to first unread message

Sameer Agarwal

unread,
Mar 13, 2018, 1:43:54 PM3/13/18
to ceres-...@googlegroups.com
Hello Everyone,

We are pleased to announce the availability of version 1.14.0 Release Candidate 1. The tarball can be downloaded from


This release brings a number of changes
  1. A new "EvaluationCallback" API to allow for pre-computation and caching of residuals/Jacobians across CostFunctions.
  2. TBB and pure C++11 based threading. 
  3. TinySolver - a small, header only, low latency focused version of Ceres meant for solving small problems fast. The API for this is still unstable as we are still actively developing it.
  4. Ceres can now be build using Bazel (https://bazel.build/
There is one minor API change:

Solver::Options::num_linear_solver_threads is deprecated and is ignored in favor of Solver::Options::num_threads.

Besides this there is the usual bevy of bug fixes & performance improvements. We would appreciate you testing on as many platforms as possible and we would love to hear of your experiences, good and bad. 

This is also the last release of Ceres which will support C++98.  Shortly after 1.14.0 is released, C++11 will be required to build Ceres.

Happy optimizing,
Ceres Solver Team

Yvonnic

unread,
Mar 14, 2018, 1:09:16 PM3/14/18
to Ceres Solver
Hello Sameer,

The build fails with Visual Studio 2010 :
- due to partial C++11 support.
- has an error with TBB 4.3

Partial log (without tbb activated) :
cmake log :
[...]
-- Building with OpenMP.
-- Performing Test COMPILER_HAS_CXX11_FLAG
-- Performing Test COMPILER_HAS_CXX11_FLAG - Failed
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE
-- Performing Test HAVE_UNORDERED_MAP_IN_STD_NAMESPACE - Success
-- Found unordered_map/set in std namespace.
-- Looking for C++ include memory
-- Looking for C++ include memory - found
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE
-- Performing Test HAVE_SHARED_PTR_IN_STD_NAMESPACE - Success
-- Found shared_ptr in std namespace using <memory> header.
   ==============================================================
   Compiling Ceres using C++11.  This will result in a version 
   of Ceres that will require the use of C++11 in client code.
   ==============================================================
-- Building Ceres as a static library.
-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.
-- Performing Test HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS
-- Performing Test HAVE_UNDERSCORE_PREFIXED_BESSEL_FUNCTIONS - Success
-- Creating configured Ceres config.h output directory: D:/Jenkins/workspace/Ceres-Solver/Ceres-Solver-windows-x86/ceres-solver/build/config/ceres/internal
-- Enabling CERES_USE_EIGEN_SPARSE in Ceres config.h
-- Enabling CERES_USE_CXX11 in Ceres config.h
[...]

build log :
array_utils.cc
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/internal/port.h(84): error C2146: syntax error : missing ';' before identifier 'size_t' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/internal/port.h(84): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/internal/port.h(91): error C2039: 'max_align_t' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/internal/port.h(91): error C2065: 'max_align_t' : undeclared identifier [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/internal/port.h(91): error C3861: 'alignof': identifier not found [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
[...]
occurring for all files that includes port.h (278 times),
constexpr, alignof and std::max_align_t are not supported by VS2010

D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(273): error C2144: syntax error : 'int' should be preceded by ';' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
          D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(298) : see reference to class template instantiation 'ceres::Jet<T,N>' being compiled
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(273): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(273): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(275): error C2864: 'ceres::Jet<T,N>::kAlignOrNot' : only static const integral data members can be initialized within a class [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(293): error C2146: syntax error : missing ';' before identifier 'size_t' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(293): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(293): error C2086: 'int ceres::Jet<T,N>::constexpr' : redefinition [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
          D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(273) : see declaration of 'ceres::Jet<T,N>::constexpr'
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(293): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(294): error C2864: 'ceres::Jet<T,N>::kAlignment' : only static const integral data members can be initialized within a class [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(296): error C2061: syntax error : identifier 'kAlignment' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(296): error C2975: '_Options' : invalid template argument for 'Eigen::Matrix', expected compile-time constant expression [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
          d:\jenkins\workspace\ceres-solver\ceres-solver-windows-x86\eigen3\eigen\src/Core/Matrix.h(126) : see declaration of '_Options'
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(296): error C2143: syntax error : missing ';' before 'Eigen::Matrix<T,N,1,0>' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(296): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]
D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(296): warning C4183: 'alignas': missing return type; assumed to be a member function returning 'int' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]

same as before : constexpr is not supported by VS2010

D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(451): error C2039: 'cbrt' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj] D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(452): error C2039: 'exp2' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj] D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(453): error C2039: 'log2' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj] D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(454): error C2039: 'hypot' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj] D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(455): error C2039: 'fmax' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj] D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\include\ceres/jet.h(456): error C2039: 'fmin' : is not a member of 'std' [D:\Jenkins\workspace\Ceres-Solver\Ceres-Solver-windows-x86\ceres-solver\build\internal\ceres\ceres.vcxproj]

std::cbrt, std::exp2, std::log2, std::hypot, std::fmax, fmin are not supported by VS2010


for TBB 4.3 errors :
error C2668: 'ceres::internal::ParallelFor' : ambiguous call to overloaded function    C:\SVN\ceres-solver-1.14.0\internal\ceres\coordinate_descent_minimizer.cc    222    1
error C2660: 'ceres::Solve' : function does not take 4 arguments    C:\SVN\ceres-solver-1.14.0\internal\ceres\coordinate_descent_minimizer.cc    214    1
[...]
error C1083: Cannot open include file: 'atomic': No such file or directory    C:\SVN\ceres-solver-1.14.0\internal\ceres\program_evaluator.h    100    1
[...]
error C2899: typename cannot be used outside a template declaration    C:\SVN\ceres-solver-1.14.0\internal\ceres\schur_eliminator_impl.h    211    1
[...]
and many more...


However we planned to upgrade to VS2017 in the next few month, so C++11 requirement will not be a problem for us.

Sameer Agarwal

unread,
Mar 14, 2018, 1:45:59 PM3/14/18
to ceres-...@googlegroups.com
Thanks for testing Yvonnic. I do not think we C++11 mode is expected to work with this version of visual studio.
Would it be possible for you to test with VS2017?

Sameer

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/743e955d-0d74-4c29-b946-bc24ce5e446b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yvonnic

unread,
Mar 15, 2018, 6:08:20 AM3/15/18
to Ceres Solver
Hi Sameer,

Sorry I cannot test it with VS2017 right now.

I understand that you will not support C++11 with VS2010.
However you should maybe change the cmake configuration file, because cmake force the #define CERES_USE_CXX11 with VS2010.

in CMakeLists.txt :
line 133 : you force CXX11 to true on MSVC (but no option -std=c++11 does not mean VS2010 fully support it)
line 438 : you make TBB dependent to CXX11 (so if CXX11 is true you will allow the use of TBB, which is not supported in your code by VS2010)
line 536 : you do not disable CXX11 on VS2010 because VS2010 have HAVE_SHARED_PTR_IN_STD_NAMESPACE and HAVE_UNORDERED_MAP_IN_STD_NAMESPACE
and then cmake force VS2010 user to use C++11 with the macro CERES_USE_CXX11

you should make a new test, just like cmake/FindSharedPtr.cmake to test all the c++11 features :

 check_cxx_source_compiles("#include <cstddef>
                                             inline double cbrt (double x) { return std::cbrt(x); }
                                             inline double exp2 (double x) { return std::exp2(x); }
                                             inline double log2 (double x) { return std::log2(x); }
                                             inline double hypot(double x, double y) { return std::hypot(x, y); }
                                             inline double fmax(double x, double y) { return std::fmax(x, y); }
                                             inline double fmin(double x, double y) { return std::fmin(x, y); }
                                             int main() {
                                               static constexpr size_t kMaxAlignBytes = alignof(std::max_align_t);
                                               return 0;
                                             }"
                              HAVE_FULL_CXX11_SUPPORT)

 check_include_file_cxx(atomic HAVE_STD_ATOMIC_HEADER)  # required for TBB


BTW, thanks for your great job !

Alex Stewart

unread,
Mar 15, 2018, 4:04:48 PM3/15/18
to ceres-...@googlegroups.com
Hi Yvonnic,


It should fix the issues you encountered with VS2010.  Note that as Sameer said, 1.14 will be the last release of Ceres to not require full C++11 support, as such the next release of Ceres will not support VS2010.

-Alex


sba...@gmail.com

unread,
Jan 22, 2019, 4:22:37 AM1/22/19
to Ceres Solver
Hello Sameer,

About : "There is one minor API change:

Solver::Options::num_linear_solver_threads is deprecated and is ignored in favor of Solver::Options::num_threads.

 the question is: has this modification in V1,14 been proposed in the later version (V1.12)?
Or should we go to V1.14 to use it.

Thank you
Ali

Sameer Agarwal

unread,
Jan 22, 2019, 1:50:48 PM1/22/19
to ceres-...@googlegroups.com
1.14 already has this modification.

--
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.
Reply all
Reply to author
Forward
0 new messages