With recent updates to Eigen and CppAD, I finally found time to ensure my code is compatible with the latest versions of both. However, I am now getting the following error after make check example. I did not have the problem with Eigen 3.2.9, but I don’t know if it’s something that needs to be changed in Eigen or CppAD.
braunm: ~/cppad/build $ make check example
[ 3%] Built target speed_example
[ 6%] Built target speed_src
det_of_minor OK
det_by_minor OK
det_by_lu OK
elapsed_seconds OK
mat_sum_sq OK
ode_evaluate OK
sparse_hes_fun OK
sparse_jac_fun OK
speed_test OK
time_test
rel_diff = 0.144506
Error: perhaps too many other programs running
All 9 tests passed (possibly excepting elapsed_seconds).
[ 6%] Built target check_speed_example
[ 9%] Built target speed_cppad
cppad_det_lu_ok = true
cppad_det_minor_ok = true
cppad_mat_mul_ok = true
cppad_ode_ok = true
cppad_poly_ok = true
cppad_sparse_hessian_ok = true
cppad_sparse_jacobian_ok = true
All 7 correctness tests passed.
[ 9%] Built target check_speed_cppad
[ 11%] Built target speed_double
double_det_lu_ok = true
double_det_minor_ok = true
double_mat_mul_ok = true
double_ode_ok = true
double_poly_ok = true
double_sparse_hessian_ok = true
double_sparse_jacobian_ok = true
All 7 correctness tests passed.
[ 11%] Built target check_speed_double
[ 11%] Built target check_speed
[ 11%] Built target introduction_get_started
f'(3) computed by CppAD = 142
[ 11%] Built target check_introduction_get_started
[ 16%] Built target introduction_exp_apx
exp_2 OK
exp_2_cppad OK
exp_2_for0 OK
exp_2_for1 OK
exp_2_for2 OK
exp_2_rev1 OK
exp_2_rev2 OK
exp_eps OK
exp_eps_cppad OK
exp_eps_for0 OK
exp_eps_for1 OK
exp_eps_for2 OK
exp_eps_rev1 OK
exp_eps_rev2 OK
All 14 tests passed.
[ 16%] Built target check_introduction_exp_apx
[ 16%] Built target check_introduction
[ 22%] Built target example_atomic
OK: atomic: checkpoint
OK: atomic: extended_ode
OK: atomic: for_sparse_hes
OK: atomic: for_sparse_jac
OK: atomic: forward
OK: atomic: get_started
OK: atomic: mat_mul
OK: atomic: mul_level
OK: atomic: norm_sq
OK: atomic: ode
OK: atomic: reciprocal
OK: atomic: rev_sparse_hes
OK: atomic: rev_sparse_jac
OK: atomic: reverse
OK: atomic: set_sparsity
OK: atomic: tangent
OK: atomic: eigen_cholesky
OK: atomic: eigen_mat_inv
OK: atomic: eigen_mat_mul
OK: No memory leak detected
All 20 tests passed.
[ 22%] Built target check_example_atomic
[ 24%] Built target example_optimize
OK: optimize: compare_op
OK: optimize: cumulative_sum
OK: optimize: conditional_skip
OK: optimize: forward_active
OK: optimize: nest_conditional
OK: optimize: print_for
OK: optimize: reverse_active
OK: No memory leak detected
All 8 tests passed.
[ 24%] Built target check_example_optimize
[ 31%] Built target example_sparse
OK: sparse: sub_sparse_hes
OK: sparse: sparsity_sub
OK: sparse: sparse_sub_hes
OK: sparse: sparse_hes
OK: sparse: sparse_jac_for
OK: sparse: sparse_jac_rev
OK: sparse: sparse_jacobian
OK: sparse: sparse_hessian
OK: sparse: rev_hes_sparsity
OK: sparse: rev_jac_sparsity
OK: sparse: RevSparseJac
OK: sparse: rev_sparse_hes
OK: sparse: for_hes_sparsity
OK: sparse: for_jac_sparsity
OK: sparse: ForSparseJac
OK: sparse: for_sparse_hes
OK: sparse: dependency
OK: sparse: conj_grad
OK: sparse: rc_sparsity
OK: No memory leak detected
All 20 tests passed.
[ 31%] Built target check_example_sparse
[ 38%] Built target example_utility
OK: utility: CheckNumericType
OK: utility: CheckSimpleVector
OK: utility: CppAD_vector
OK: utility: ErrorHandler
OK: utility: index_sort
OK: utility: LuFactor
OK: utility: LuInvert
OK: utility: LuSolve
OK: utility: nan
OK: utility: Near_Equal
OK: utility: OdeErrControl
OK: utility: OdeErrMaxabs
OK: utility: OdeGearControl
OK: utility: OdeGear
OK: utility: RombergMul
OK: utility: RombergOne
OK: utility: runge_45_1
OK: utility: set_union
OK: utility: SimpleVector
OK: utility: thread_alloc
OK: utility: sparse_rc
OK: utility: sparse_rcv
OK: utility: to_string
OK: utility: vectorBool
OK: No memory leak detected
All 25 tests passed.
[ 38%] Built target check_example_utility
[ 39%] Building CXX object example/CMakeFiles/example.dir/eigen_det.cpp.o
In file included from /Users/braunm/cppad/example/eigen_det.cpp:30:
/Users/braunm/cppad/cppad/example/cppad_eigen.hpp:149:10: error: no template named
'significant_decimals_default_impl'; did you mean 'significant_decimals_impl'?
struct significant_decimals_default_impl< CppAD::AD<Base>, false>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
significant_decimals_impl
/opt/eigen/include/Eigen/src/Core/IO.h:118:8: note: 'significant_decimals_impl' declared here
struct significant_decimals_impl
^
In file included from /Users/braunm/cppad/example/eigen_det.cpp:30:
/Users/braunm/cppad/cppad/example/cppad_eigen.hpp:149:10: error: too many template arguments for
class template 'significant_decimals_impl'
struct significant_decimals_default_impl< CppAD::AD<Base>, false>
^ ~~~~~~
/opt/eigen/include/Eigen/src/Core/IO.h:118:8: note: template is declared here
struct significant_decimals_impl
^
In file included from /Users/braunm/cppad/example/eigen_det.cpp:30:
In file included from /Users/braunm/cppad/cppad/example/cppad_eigen.hpp:73:
In file included from /opt/eigen/include/Eigen/Core:348:
/opt/eigen/include/Eigen/src/Core/util/XprHelper.h:64:98: error: no type named 'Literal' in
'Eigen::NumTraits<CppAD::AD<double> >'
...: promote_scalar_arg_unsupported<S,T,typename NumTraits<S>::Literal> {};
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/opt/eigen/include/Eigen/src/Core/../plugins/CommonCwiseBinaryOps.h:50:1: note: in instantiation
of template class 'Eigen::internal::promote_scalar_arg<CppAD::AD<double>,
Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, -1, false>, false>' requested here
EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
^
/opt/eigen/include/Eigen/src/Core/util/Macros.h:958:3: note: expanded from macro
'EIGEN_MAKE_SCALAR_BINARY_OP'
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)
^
/opt/eigen/include/Eigen/src/Core/util/Macros.h:940:120: note: expanded from macro
'EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT'
...EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg<Sca...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:492:30: note: while substituting deduced template
arguments into function template 'operator*' [with T =
Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, -1, false>]
A22.noalias() -= A21 * A12;
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:509:7: note: in instantiation of member function
'Eigen::internal::partial_lu_impl<CppAD::AD<double>, 0, int>::blocked_lu' requested here
::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpo...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:530:13: note: in instantiation of function
template specialization
'Eigen::internal::partial_lu_inplace<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
Eigen::Transpositions<-1, -1, int> >' requested here
internal::partial_lu_inplace(m_lu, m_rowsTranspositions, nb_transpositions);
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:131:7: note: in instantiation of member function
'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::compute'
requested here
compute();
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:323:3: note: in instantiation of function
template specialization 'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0,
-1, -1> >::compute<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
compute(matrix.derived());
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:591:10: note: in instantiation of function
template specialization 'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0,
-1, -1> >::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested
here
return PartialPivLU<PlainObject>(eval());
^
/opt/eigen/include/Eigen/src/LU/Determinant.h:41:14: note: in instantiation of member function
'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::partialPivLu'
requested here
return m.partialPivLu().determinant();
^
/opt/eigen/include/Eigen/src/LU/Determinant.h:96:83: note: in instantiation of member function
'Eigen::internal::determinant_impl<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
-1>::run' requested here
return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(de...
^
/Users/braunm/cppad/example/eigen_det.cpp:77:20: note: in instantiation of member function
'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::determinant'
requested here
a_y[0] = log( a_X.determinant() );
^
In file included from /Users/braunm/cppad/example/eigen_det.cpp:30:
In file included from /Users/braunm/cppad/cppad/example/cppad_eigen.hpp:73:
In file included from /opt/eigen/include/Eigen/Core:348:
/opt/eigen/include/Eigen/src/Core/util/XprHelper.h:64:98: error: no type named 'Literal' in
'Eigen::NumTraits<CppAD::AD<double> >'
...: promote_scalar_arg_unsupported<S,T,typename NumTraits<S>::Literal> {};
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/opt/eigen/include/Eigen/src/Core/../plugins/CommonCwiseBinaryOps.h:50:1: note: in instantiation
of template class 'Eigen::internal::promote_scalar_arg<CppAD::AD<double>,
Eigen::VectorBlock<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<CppAD::AD<double>,
-1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, 1, -1, false>, -1>, false>'
requested here
EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
^
/opt/eigen/include/Eigen/src/Core/util/Macros.h:958:3: note: expanded from macro
'EIGEN_MAKE_SCALAR_BINARY_OP'
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)
^
/opt/eigen/include/Eigen/src/Core/util/Macros.h:940:120: note: expanded from macro
'EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT'
...EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg<Sca...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:406:78: note: while substituting deduced template
arguments into function template 'operator*' [with T =
Eigen::VectorBlock<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<CppAD::AD<double>,
-1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, 1, -1, false>, -1>]
lu.bottomRightCorner(rrows,rcols).noalias() -= lu.col(k).tail(rrows) * lu.row(k)...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:436:14: note: in instantiation of member function
'Eigen::internal::partial_lu_impl<CppAD::AD<double>, 0, int>::unblocked_lu' requested here
return unblocked_lu(lu, row_transpositions, nb_transpositions);
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:509:7: note: in instantiation of member function
'Eigen::internal::partial_lu_impl<CppAD::AD<double>, 0, int>::blocked_lu' requested here
::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpo...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:530:13: note: in instantiation of function
template specialization
'Eigen::internal::partial_lu_inplace<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
Eigen::Transpositions<-1, -1, int> >' requested here
internal::partial_lu_inplace(m_lu, m_rowsTranspositions, nb_transpositions);
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:131:7: note: (skipping 1 context in backtrace;
use -ftemplate-backtrace-limit=0 to see all)
compute();
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:323:3: note: in instantiation of function
template specialization 'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0,
-1, -1> >::compute<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
compute(matrix.derived());
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:591:10: note: in instantiation of function
template specialization 'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0,
-1, -1> >::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested
here
return PartialPivLU<PlainObject>(eval());
^
/opt/eigen/include/Eigen/src/LU/Determinant.h:41:14: note: in instantiation of member function
'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::partialPivLu'
requested here
return m.partialPivLu().determinant();
^
/opt/eigen/include/Eigen/src/LU/Determinant.h:96:83: note: in instantiation of member function
'Eigen::internal::determinant_impl<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
-1>::run' requested here
return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(de...
^
/Users/braunm/cppad/example/eigen_det.cpp:77:20: note: in instantiation of member function
'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::determinant'
requested here
a_y[0] = log( a_X.determinant() );
^
In file included from /Users/braunm/cppad/example/eigen_det.cpp:30:
In file included from /Users/braunm/cppad/cppad/example/cppad_eigen.hpp:73:
In file included from /opt/eigen/include/Eigen/Core:348:
/opt/eigen/include/Eigen/src/Core/util/XprHelper.h:64:98: error: no type named 'Literal' in
'Eigen::NumTraits<CppAD::AD<double> >'
...: promote_scalar_arg_unsupported<S,T,typename NumTraits<S>::Literal> {};
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/opt/eigen/include/Eigen/src/Core/../plugins/CommonCwiseBinaryOps.h:50:1: note: in instantiation
of template class 'Eigen::internal::promote_scalar_arg<CppAD::AD<double>,
Eigen::VectorBlock<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<CppAD::AD<double>,
-1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, true>, -1>, false>'
requested here
EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
^
/opt/eigen/include/Eigen/src/Core/util/Macros.h:957:3: note: expanded from macro
'EIGEN_MAKE_SCALAR_BINARY_OP'
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \
^
/opt/eigen/include/Eigen/src/Core/util/Macros.h:949:112: note: expanded from macro
'EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT'
...EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(typename internal::promote_scalar_arg<Scalar EIGE...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:406:78: note: while substituting deduced template
arguments into function template 'operator*' [with T =
Eigen::VectorBlock<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<CppAD::AD<double>,
-1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, true>, -1>]
lu.bottomRightCorner(rrows,rcols).noalias() -= lu.col(k).tail(rrows) * lu.row(k)...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:436:14: note: in instantiation of member function
'Eigen::internal::partial_lu_impl<CppAD::AD<double>, 0, int>::unblocked_lu' requested here
return unblocked_lu(lu, row_transpositions, nb_transpositions);
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:509:7: note: in instantiation of member function
'Eigen::internal::partial_lu_impl<CppAD::AD<double>, 0, int>::blocked_lu' requested here
::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpo...
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:530:13: note: in instantiation of function
template specialization
'Eigen::internal::partial_lu_inplace<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
Eigen::Transpositions<-1, -1, int> >' requested here
internal::partial_lu_inplace(m_lu, m_rowsTranspositions, nb_transpositions);
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:131:7: note: (skipping 1 context in backtrace;
use -ftemplate-backtrace-limit=0 to see all)
compute();
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:323:3: note: in instantiation of function
template specialization 'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0,
-1, -1> >::compute<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
compute(matrix.derived());
^
/opt/eigen/include/Eigen/src/LU/PartialPivLU.h:591:10: note: in instantiation of function
template specialization 'Eigen::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0,
-1, -1> >::PartialPivLU<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested
here
return PartialPivLU<PlainObject>(eval());
^
/opt/eigen/include/Eigen/src/LU/Determinant.h:41:14: note: in instantiation of member function
'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::partialPivLu'
requested here
return m.partialPivLu().determinant();
^
/opt/eigen/include/Eigen/src/LU/Determinant.h:96:83: note: in instantiation of member function
'Eigen::internal::determinant_impl<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>,
-1>::run' requested here
return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(de...
^
/Users/braunm/cppad/example/eigen_det.cpp:77:20: note: in instantiation of member function
'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::determinant'
requested here
a_y[0] = log( a_X.determinant() );
^
5 errors generated.
make[3]: *** [example/CMakeFiles/example.dir/eigen_det.cpp.o] Error 1
make[2]: *** [example/CMakeFiles/example.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2