James-Thorson-NOAA / VAST

Spatio-temporal analysis of univariate or multivariate data, e.g., standardizing data for multiple species or stages
http://www.FishStats.org
GNU General Public License v3.0
124 stars 54 forks source link

tutorials not working #146

Closed evebohnett closed 3 years ago

evebohnett commented 5 years ago

This line of both multi and single spp tutorials will not compile. Maybe I need to use an earlier version of VAST. I'm not sure.

TmbList = Build_TMB_Fn("TmbData"=TmbData, "RunDir"=DateFile, "Version"=Version, "RhoConfig"=RhoConfig, "loc_x"=Spatial_List$loc_x, "Method"=Method)

It says at the very bottom:

18 warnings and 12 errors generated. make: *** [VAST_v5_4_0.o] Error 1 Error in compile(paste0(Version, ".cpp")) : Compilation failed

Here's the rest of what should have been the compilation running.... clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Users/apple/Library/R/3.4/library/TMB/include -I/Users/apple/Library/R/3.4/library/RcppEigen/include -DTMB_SAFEBOUNDS -DLIB_UNLOAD=R_unload_VAST_v5_4_0 -DTMB_LIB_INIT=R_init_VAST_v5_4_0 -I/usr/local/include -fPIC -Wall -g -O2 -c VAST_v5_4_0.cpp -o VAST_v5_4_0.o In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:535: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:2: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/LU:47: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:3: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Cholesky:12: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Jacobi:29: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:3: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Cholesky:43: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:4: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/QR:17: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Householder:27: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:5: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SVD:48: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:6: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Geometry:58: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:7: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Eigenvalues:58: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:26: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SparseCore:66: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:27: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/OrderingMethods:71: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:29: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SparseCholesky:43: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:32: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SparseQR:35: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:33: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/IterativeLinearSolvers:46: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]

pragma clang diagnostic pop

                         ^

VAST_v5_4_0.cpp:671:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if( (Options_vec(8)==1) ){


VAST_v5_4_0.cpp:671:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v5_4_0.cpp:671:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
VAST_v5_4_0.cpp:671:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1106:6: note: in instantiation of member function 'objective_function<CppAD::AD<double> >::operator()' requested here
    F(); // Run through user template (modifies reportvector)
     ^
VAST_v5_4_0.cpp:671:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v5_4_0.cpp:671:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:371:
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:713:12: error: no matching function for call to 'isfinite'
    return isfinite EIGEN_NOT_A_MACRO (x);
           ^~~~~~~~
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:950:87: note: in instantiation of function template specialization 'Eigen::internal::isfinite_impl<CppAD::AD<double> >' requested here
template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }
                                                                                      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:1260:19: note: in instantiation of function template specialization 'Eigen::numext::isfinite<CppAD::AD<double> >' requested here
  return (numext::isfinite)(numext::real(x)) && (numext::isfinite)(numext::imag(x));
                  ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:950:87: note: in instantiation of function template specialization 'Eigen::internal::isfinite_impl<CppAD::AD<double> >' requested here
template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }
                                                                                      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:407:14: note: in instantiation of function template specialization 'Eigen::numext::isfinite<std::__1::complex<CppAD::AD<double> > >' requested here
        if(!(isfinite)(m_eivalues.coeffRef(i)))
             ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<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(), computeEigenvectors);
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:70:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v5_4_0.cpp:351:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v5_4_0.cpp:597:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<double> >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1106:6: note: in instantiation of member function 'objective_function<CppAD::AD<double> >::operator()' requested here
    F(); // Run through user template (modifies reportvector)
     ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:376:25: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<double>]
typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
                        ^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:673:24: error: no matching function for call to 'fmax'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
                       ^~~~
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:542:74: note: in instantiation of function template specialization 'std::__1::operator/<CppAD::AD<double> >' requested here
        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);
                                                                         ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:447:7: note: in instantiation of member function 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::doComputeEigenvectors' requested here
      doComputeEigenvectors();
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<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(), computeEigenvectors);
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:70:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v5_4_0.cpp:351:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<double>, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v5_4_0.cpp:597:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<double> >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1106:6: note: in instantiation of member function 'objective_function<CppAD::AD<double> >::operator()' requested here
    F(); // Run through user template (modifies reportvector)
     ^
/usr/include/math.h:546:15: note: candidate function not viable: no known conversion from 'AD<double>' to 'double' for 1st argument
extern double fmax(double, double);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1252:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fmaxf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1253:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmaxl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1263:1: note: candidate template ignored: substitution failure [with _A1 = CppAD::AD<double>, _A2 = CppAD::AD<double>]: no type named 'type' in 'std::__1::__lazy_enable_if<false, std::__1::__promote<CppAD::AD<double>, CppAD::AD<double>, void> >'
fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:681:15: error: no matching function for call to 'scalbn'
    _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
              ^~~~~~
/usr/include/math.h:423:15: note: candidate function not viable: no known conversion from 'AD<double>' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1593:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1594:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1598:20: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<double>]
typename enable_if<is_integral<_A1>::value, double>::type
                   ^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:682:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
              ^~~~~~
/usr/include/math.h:423:15: note: candidate function not viable: no known conversion from 'AD<double>' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1593:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1594:46: note: candidate function not viable: no known conversion from 'AD<double>' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1598:20: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<double>]
typename enable_if<is_integral<_A1>::value, double>::type
                   ^
VAST_v5_4_0.cpp:671:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1340:34: note: in instantiation of member function 'objective_function<double>::operator()' requested here
      PROTECT( res = asSEXP( pf->operator()() ) );
                                 ^
VAST_v5_4_0.cpp:671:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v5_4_0.cpp:671:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
VAST_v5_4_0.cpp:671:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:877:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1389:10: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::evalUserTemplate' requested here
  y[0]=F.evalUserTemplate();
         ^
VAST_v5_4_0.cpp:671:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v5_4_0.cpp:671:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:371:
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:713:12: error: no matching function for call to 'isfinite'
    return isfinite EIGEN_NOT_A_MACRO (x);
           ^~~~~~~~
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:950:87: note: in instantiation of function template specialization 'Eigen::internal::isfinite_impl<CppAD::AD<CppAD::AD<double> > >' requested here
template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }
                                                                                      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:1260:19: note: in instantiation of function template specialization 'Eigen::numext::isfinite<CppAD::AD<CppAD::AD<double> > >' requested here
  return (numext::isfinite)(numext::real(x)) && (numext::isfinite)(numext::imag(x));
                  ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:950:87: note: in instantiation of function template specialization 'Eigen::internal::isfinite_impl<CppAD::AD<CppAD::AD<double> > >' requested here
template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }
                                                                                      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:407:14: note: in instantiation of function template specialization 'Eigen::numext::isfinite<std::__1::complex<CppAD::AD<CppAD::AD<double> > > >' requested here
        if(!(isfinite)(m_eivalues.coeffRef(i)))
             ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:70:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v5_4_0.cpp:351:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v5_4_0.cpp:597:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<CppAD::AD<double> > >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:877:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1389:10: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::evalUserTemplate' requested here
  y[0]=F.evalUserTemplate();
         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:376:25: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<CppAD::AD<double> >]
typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
                        ^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:673:24: error: no matching function for call to 'fmax'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
                       ^~~~
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:542:74: note: in instantiation of function template specialization 'std::__1::operator/<CppAD::AD<CppAD::AD<double> > >' requested here
        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);
                                                                         ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:447:7: note: in instantiation of member function 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::doComputeEigenvectors' requested here
      doComputeEigenvectors();
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:70:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v5_4_0.cpp:351:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<CppAD::AD<double> >, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v5_4_0.cpp:597:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<CppAD::AD<double> > >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:877:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1389:10: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<double> > >::evalUserTemplate' requested here
  y[0]=F.evalUserTemplate();
         ^
/usr/include/math.h:546:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'double' for 1st argument
extern double fmax(double, double);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1252:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fmaxf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1253:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmaxl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1263:1: note: candidate template ignored: substitution failure [with _A1 = CppAD::AD<CppAD::AD<double> >, _A2 = CppAD::AD<CppAD::AD<double> >]: no type named 'type' in 'std::__1::__lazy_enable_if<false, std::__1::__promote<CppAD::AD<CppAD::AD<double> >, CppAD::AD<CppAD::AD<double> >, void> >'
fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:681:15: error: no matching function for call to 'scalbn'
    _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
              ^~~~~~
/usr/include/math.h:423:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1593:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1594:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1598:20: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<CppAD::AD<double> >]
typename enable_if<is_integral<_A1>::value, double>::type
                   ^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:682:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
              ^~~~~~
/usr/include/math.h:423:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1593:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1594:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<double> >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1598:20: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<CppAD::AD<double> >]
typename enable_if<is_integral<_A1>::value, double>::type
                   ^
VAST_v5_4_0.cpp:671:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if( (Options_vec(8)==1) ){
         ~~~~~~~~~~~~~~^~~
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:877:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1504:12: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::evalUserTemplate' requested here
  y[0] = F.evalUserTemplate();
           ^
VAST_v5_4_0.cpp:671:24: note: remove extraneous parentheses around the comparison to silence this warning
    if( (Options_vec(8)==1) ){
        ~              ^  ~
VAST_v5_4_0.cpp:671:24: note: use '=' to turn this equality comparison into an assignment
    if( (Options_vec(8)==1) ){
                       ^~
                       =
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:371:
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:713:12: error: no matching function for call to 'isfinite'
    return isfinite EIGEN_NOT_A_MACRO (x);
           ^~~~~~~~
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:950:87: note: in instantiation of function template specialization 'Eigen::internal::isfinite_impl<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }
                                                                                      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:1260:19: note: in instantiation of function template specialization 'Eigen::numext::isfinite<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
  return (numext::isfinite)(numext::real(x)) && (numext::isfinite)(numext::imag(x));
                  ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/MathFunctions.h:950:87: note: in instantiation of function template specialization 'Eigen::internal::isfinite_impl<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); }
                                                                                      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:407:14: note: in instantiation of function template specialization 'Eigen::numext::isfinite<std::__1::complex<CppAD::AD<CppAD::AD<CppAD::AD<double> > > > >' requested here
        if(!(isfinite)(m_eivalues.coeffRef(i)))
             ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:70:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v5_4_0.cpp:351:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v5_4_0.cpp:597:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:877:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1504:12: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::evalUserTemplate' requested here
  y[0] = F.evalUserTemplate();
           ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:376:25: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]
typename std::enable_if<std::is_arithmetic<_A1>::value, bool>::type
                        ^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:673:24: error: no matching function for call to 'fmax'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
                       ^~~~
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:542:74: note: in instantiation of function template specialization 'std::__1::operator/<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
        ComplexScalar cc = ComplexScalar(Scalar(0),-m_matT.coeff(n-1,n)) / ComplexScalar(m_matT.coeff(n-1,n-1)-p,q);
                                                                         ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:447:7: note: in instantiation of member function 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::doComputeEigenvectors' requested here
      doComputeEigenvectors();
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/EigenSolver.h:156:7: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >' requested here
      compute(matrix.derived(), computeEigenvectors);
      ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:39:12: note: in instantiation of function template specialization 'Eigen::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::EigenSolver<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >' requested here
    return EigenSolver<PlainObject>(m_eval, false).eigenvalues();
           ^
/Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h:70:81: note: in instantiation of member function 'Eigen::internal::eigenvalues_selector<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1>, false>::run' requested here
  return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
                                                                                ^
VAST_v5_4_0.cpp:351:58: note: in instantiation of member function 'Eigen::MatrixBase<Eigen::Matrix<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, -1, -1, 0, -1, -1> >::eigenvalues' requested here
    vector< std::complex<Type> > eigenvalues_B_ff = B_ff.eigenvalues();
                                                         ^
VAST_v5_4_0.cpp:597:10: note: in instantiation of function template specialization 'calculate_B<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >' requested here
  B_ff = calculate_B( VamConfig(0), n_f1, VamConfig(1), Chi_fr, Psi_fr, jnll_comp(13) );
         ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:877:20: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::operator()' requested here
    Type ans=this->operator()();
                   ^
/Users/apple/Library/R/3.4/library/TMB/include/tmb_core.hpp:1504:12: note: in instantiation of member function 'objective_function<CppAD::AD<CppAD::AD<CppAD::AD<double> > > >::evalUserTemplate' requested here
  y[0] = F.evalUserTemplate();
           ^
/usr/include/math.h:546:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'double' for 1st argument
extern double fmax(double, double);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1252:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return fmaxf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1253:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmaxl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1263:1: note: candidate template ignored: substitution failure [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >, _A2 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]: no type named 'type' in 'std::__1::__lazy_enable_if<false, std::__1::__promote<CppAD::AD<CppAD::AD<CppAD::AD<double> > >, CppAD::AD<CppAD::AD<CppAD::AD<double> > >, void> >'
fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:681:15: error: no matching function for call to 'scalbn'
    _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
              ^~~~~~
/usr/include/math.h:423:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1593:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1594:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1598:20: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]
typename enable_if<is_integral<_A1>::value, double>::type
                   ^
In file included from VAST_v5_4_0.cpp:1:
In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:96:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:682:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
              ^~~~~~
/usr/include/math.h:423:15: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'double' for 1st argument
extern double scalbn(double, int);
              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1593:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'float' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return scalbnf(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1594:46: note: candidate function not viable: no known conversion from 'AD<CppAD::AD<CppAD::AD<double> > >' to 'long double' for 1st argument
inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return scalbnl(__lcpp_x, __lcpp_y);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:1598:20: note: candidate template ignored: disabled by 'enable_if' [with _A1 = CppAD::AD<CppAD::AD<CppAD::AD<double> > >]
typename enable_if<is_integral<_A1>::value, double>::type
                   ^
James-Thorson commented 5 years ago

Hi,

I've been waiting to respond to see if anyone else reports this same problem. I apologize that I don't have a MacOS machine to replicate this Clang compiler error, and also don't understand it enough to give any advice. I would be curious to hear if you can replicate this error using a Windows or Linux OS, or if others are seeing this issue.

evebohnett commented 5 years ago

Thanks for checking on it. I got an earlier version of VAST to work. I did some updates in R recently. I'll try again. It must be something with my machine.  Best,  Eve Bohnett

On Thursday, February 14, 2019, 2:18:50 PM EST, Jim Thorson <notifications@github.com> wrote:  

Hi,

I've been waiting to respond to see if anyone else reports this same problem. I apologize that I don't have a MacOS machine to replicate this Clang compiler error, and also don't understand it enough to give any advice. I would be curious to hear if you can replicate this error using a Windows or Linux OS, or if others are seeing this issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Keisuke-Satoh-NRIFSF commented 5 years ago

Hi,

I also face same error messages when I tried to build TmbList.

TmbList = Build_TMB_Fn( "TmbData"=TmbData, "RunDir"=DateFile, "Version"=Version, "RhoConfig"=RhoConfig, "loc_x"=Spatial_List$loc_x, "Method"=Method ) Error in compile(paste0(Version, ".cpp")) : Compilation failed In addition: Warning message: 'Build_TMB_Fn' is deprecated. Use 'VAST::make_model' instead. See help("Deprecated")

Actually, I faced this problem since yesterday after accidentally reinstalling VAST. After that some previous codes have failed to work. For example, the following code also does not work, and then I have stopped to use the library(tidyverse), the code can work.

plot_data(Extrapolation_List=Extrapolation_List, Spatial_List=Spatial_List, Data_Geostat=Data_Geostat, PlotDir=DateFile ) Error in as_mapper(.f, ...) : argument ".f" is missing, with no default

I have reinstalled RStudio, Microsoft R Open, VAST, INLA and TMB, however the situation does not change. My OS is Windows 10. You can find model setting of the code as follows;

3. Setting for VAST

3.1 Spatial settings

Version = "VAST_v5_4_0" ( I also try "VAST_v7_0_0", but the situation was same) Method = c("Grid", "Mesh", "Spherical_mesh")[2] grid_size_km = 50 n_x = c(10, 20, 50, 100, 200, 500)[5] # Number of stations Kmeans_Config = list( "randomseed"=1, "nstart"=100, "iter.max"=1e3 )

3.2 Model settings

FieldConfig = c("Omega1"=1, "Epsilon1"=1, "Omega2"=1, "Epsilon2"=1) RhoConfig = c("Beta1"=0, "Beta2"=0, "Epsilon1"=0, "Epsilon2"=0) OverdispersionConfig = c("Eta1"=0, "Eta2"=0) ObsModel = c(1,0)

3.3 Potential outputs

Options = c("SD_site_density"=0, "SD_site_logdensity"=0, "Calculate_Range"=1,"Calculate_evenness"=0, "Calculate_effective_area"=1, "Calculate_Cov_SE"=0,'Calculate_Synchrony'=0, 'Calculate_Coherence'=0)

3.4 Stratification for results

strata.limits <- data.frame('STRATA'="1")

3.5 Derived objects

Region = "Other"

James-Thorson commented 5 years ago

I have no idea what as.mapper is but a short google shows that its part of tidyverse, and apparently its interfering with TMB somehow. Please try re-running on a fresh R console without any tidyverse loaded or installed.

Also, I don't really understand your question due to some grammar issues. Feel free to edit your question and I'll look again. For example, what functions are throwing errors? What are the error messages?

Keisuke-Satoh-NRIFSF commented 5 years ago

Hi, Thank you for quick response. When I run this code, TmbList = Build_TMB_Fn( "TmbData"=TmbData, "RunDir"=DateFile, "Version"=Version, "RhoConfig"=RhoConfig, "loc_x"=Spatial_List$loc_x, "Method"=Method )

I received this error message. It is my problem. Error in compile(paste0(Version, ".cpp")) : Compilation failed

Best

evebohnett commented 5 years ago

Hi, I was able to get everything to run if I downgraded the version of VAST to 2.5.0 or something around that version ( I only tried one downgraded version).

James-Thorson commented 5 years ago

What was the error message for the compile statement?

That is ultimately an issue with your installation of TMB, and the error message would give a bit more insight before referring you to that issue tracker.

jimianelli commented 5 years ago

I found the same/similar error messages on mac OS w/ everything upgraded for VAST7.0 (but a couple of other TMB models compiled and ran). Testing full suite of TMB models in tmb_examples. Would be great if VAST worked on a mac...

seanhardison1 commented 4 years ago

Hi everyone,

I'm trying to run the species ordination example on my mac, and it looks like I'm getting similar error messages to @evebohnett's post.

Running the example ends with the following error

18 warnings and 9 errors generated.
make: *** [VAST_v8_0_0.o] Error 1
Error in compile(paste0(Version, ".cpp")) : Compilation failed

The two errors being repeated are

error: no matching function for call to 'fmax'
error: no matching function for call to 'scalbn'

I'm using a mac with R 3.6.2 and clang8 installed

Following this issue, I adjusted my Makevars file to be:

##CC=/usr/local/clang8/bin/clang
##CXX=/usr/local/clang8/bin/clang++
CC=gcc
CXX=/usr/local/bin/g++-9
CXX1X=/usr/local/clang8/bin/clang++
CXX98=/usr/local/clang8/bin/clang++
CXX11=/usr/local/clang8/bin/clang++
CXX14=/usr/local/clang8/bin/clang++
CXX17=/usr/local/clang8/bin/clang++
LDFLAGS=-L/usr/local/clang8/lib

Installing previous versions of VAST doesn't seem to work for me, and I've confirmed that TMB is installed correctly following this post. Any ideas?

Cole-Monnahan-NOAA commented 4 years ago

Can you try compiling the VAST .cpp file outside of the example script?

seanhardison1 commented 4 years ago

Still no luck. I tried

download.file("https://raw.githubusercontent.com/James-Thorson-NOAA/VAST/master/inst/executables/VAST_v8_0_0.cpp",
              "VAST_v8_0_0.cpp")
Version="VAST_v8_0_0"
TMB::compile( paste0(Version,".cpp") )

It looks like I'm getting the same error as before

Cole-Monnahan-NOAA commented 4 years ago

Hi @seanhardison1 I'm at a bit of a loss. Can you confirm you can run all the TMB examples? TMB::runExample(all=TRUE, clean=TRUE)? Are you sure you have the latest TMB version?

seanhardison1 commented 4 years ago

@Cole-Monnahan-NOAA here's the error I get when running TMB::runExample(all=TRUE, clean=TRUE):

clang: error: unsupported option '-fopenmp'
make: *** [linreg_parallel.o] Error 1
Error in compile(paste0(name, ".cpp"), ...) : Compilation failed
In addition: Warning messages:
1: In file.remove(dynlib(name)) :
  cannot remove file 'ar1xar1.so', reason 'No such file or directory'
2: In file.remove(paste0(name, ".o")) :
  cannot remove file 'ar1xar1.o', reason 'No such file or directory'
3: In file.remove(dynlib(name)) :
  cannot remove file 'linreg_parallel.so', reason 'No such file or directory'
4: In file.remove(paste0(name, ".o")) :
  cannot remove file 'linreg_parallel.o', reason 'No such file or directory'
Timing stopped at: 0.018 0.015 0.036

I thought I had the latest version installed but maybe it's not installing properly?

Cole-Monnahan-NOAA commented 4 years ago

The other examples ran? E.g., runExample('simple', clean=TRUE) compiles and optimizes? It may just be that something isn't working with the parallel setup of that example. VAST doesn't use this so that shouldn't be an issue if the other examples work.

seanhardison1 commented 4 years ago

That example runs fine, although I do get a series of warning messages:

/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop

I'll give the other examples a shot! thanks

jimianelli commented 4 years ago

I get the same, sqrt is ambiguous, no function 'fmax', and no matching function to 'scalbn'

jimianelli commented 4 years ago

seeing Cheryl's Makevars addition (in https://github.com/James-Thorson-NOAA/VAST/issues/218 ), and adding those into my ~/.R/Makevars file did the trick apparently. Suspect it was the fortran variable and gcc in https://github.com/James-Thorson-NOAA/VAST/issues/218

James-Thorson-NOAA commented 3 years ago

I think I fixed these install issues on macOS by removing some functionality for MICE models (which used compiler options not available on macOS). Also fixed original issue by deprecating those Rmd examples, and moving to Wiki examples using high-level interface.