Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark tests fail to compile with CppAD #14

Open
Sanithovski opened this issue May 29, 2019 · 1 comment
Open

Benchmark tests fail to compile with CppAD #14

Sanithovski opened this issue May 29, 2019 · 1 comment

Comments

@Sanithovski
Copy link

Sanithovski commented May 29, 2019

Hi.
I was trying to compile the Adept-2 library. I have CppAD installed so the process also tries to generate the benchmark tests for CppAD. However, when I was trying to do make check the benchmark tests failed to compile.

In file included from differentiator.h:39:0,
                 from autodiff_benchmark.cpp:17:
advection_schemes.h: In instantiation of ‘void lax_wendroff_vector(int, Real, const aReal*, aReal*) [with aReal = CppAD::AD<double>; Real = double]’:
differentiator.h:107:26:   required from ‘void Differentiator::func(TestAlgorithm, const std::vector<T>&, std::vector<T>&) [with ActiveRealType = CppAD::AD<double>]’
differentiator.h:520:35:   required from here
advection_schemes.h:80:33: error: cannot convert ‘const CppAD::AD<double>’ to ‘double’ in assignment
   for (int i=0; i<NX; i++) Q(i) = q_init[i]; // Initialize q
                            ~~~~~^~~~~~~~~
advection_schemes.h: In instantiation of ‘void toon_vector(int, Real, const aReal*, aReal*) [with aReal = CppAD::AD<double>; Real = double]’:
differentiator.h:110:18:   required from ‘void Differentiator::func(TestAlgorithm, const std::vector<T>&, std::vector<T>&) [with ActiveRealType = CppAD::AD<double>]’
differentiator.h:520:35:   required from here
advection_schemes.h:102:33: error: cannot convert ‘const CppAD::AD<double>’ to ‘double’ in assignment
   for (int i=0; i<NX; i++) Q(i) = q_init[i]; // Initialize q
                            ~~~~~^~~~~~~~~
Makefile:456: recipe for target 'autodiff_benchmark-autodiff_benchmark.o' failed
make[2]: *** [autodiff_benchmark-autodiff_benchmark.o] Error 1
make[2]: Leaving directory '/home/sanithovski/ids/Adept-2/benchmark'
Makefile:572: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2

I am using Ubuntu 18.04.2 with gcc 6.5.0, but I tried with gcc 8.3.0 and got the same error. I suspect there is a change in the related functions from newer versions of CppAD.

Thanks.

@rjhogan
Copy link
Owner

rjhogan commented Jun 1, 2019

I don't test that the benchmarks against CppAD, ADOLC etc work every version, so it is possible that CppAD hasn't changed but the benchmarks have somehow been broken. I'll look into it. I expect the benchmarks in Adept 1.1 still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants