Giter VIP home page Giter VIP logo

Comments (4)

joaoleal avatar joaoleal commented on June 5, 2024

Hello Alex,

I'm using ubuntu 18.04 and I couldn't reproduce the issue.
Which version of CppAD and CppADCodeGen are you using?
How did you install the packages?

Could you please try the following steps:

sudo apt install cppad
git clone https://github.com/joaoleal/CppADCodeGen.git
cd CppADCodeGen
mkdir build
cd build
ccmake .. # or cmake ..
cd example
make example_lagrangian

I see the following output:

joao@megafox:~/Development/CppADCodeGen/build/example$ make >example_lagrangian
Building CXX object example/CMakeFiles/lagrangian.dir/lagrangian.cpp.o
Linking CXX executable lagrangian
Built target lagrangian
(0,0) 4
(0,2) 6.5
(1,1) 6
(2,0) 6.5
(2,2) 8
Built target example_lagrangian

from cppadcodegen.

alexliniger avatar alexliniger commented on June 5, 2024

Thanks for the instructions. I was able to get everything running by following your continuous integration code. What i found is that now,
cmake -DCPPAD_HOME=$CPPAD_HOME ..
does work and i can compile the examples. But just using the cppAD version in my usr/include folder cmake .. does produce an error, now actually a different error.

/Documents/GitHub/CppADCodeGen2/build/example$ make example_lagrangian
Scanning dependencies of target lagrangian
[100%] Building CXX object example/CMakeFiles/lagrangian.dir/lagrangian.cpp.o
In file included from /home/orca/Documents/GitHub/CppADCodeGen2/include/cppad/cg/extra/extra.hpp:20:0,
from /home/orca/Documents/GitHub/CppADCodeGen2/include/cppad/cg/cppadcg.hpp:151,
from /home/orca/Documents/GitHub/CppADCodeGen2/include/cppad/cg.hpp:18,
from /home/orca/Documents/GitHub/CppADCodeGen2/example/lagrangian.cpp:18:
/home/orca/Documents/GitHub/CppADCodeGen2/include/cppad/cg/extra/sparse_forjac_hessian.hpp: In function โ€˜size_t CppAD::cg::colorForwardJacobianHessian(const CppAD::ADFun&, const VectorSet&, const VectorSet&, CppAD::cg::SparseForjacHessianWork&)โ€™:
/home/orca/Documents/GitHub/CppADCodeGen2/include/cppad/cg/extra/sparse_forjac_hessian.hpp:247:38: error: โ€˜localโ€™ has not been declared
using SparsityPattern = typename local::internal_sparsity<Set_type>::pattern_type;

and a lot more errors all related to the sparse functionality.

from cppadcodegen.

joaoleal avatar joaoleal commented on June 5, 2024

This appears to be related to #7 (comment)
The version of CppAD in 16.04 (https://packages.ubuntu.com/xenial/cppad) is not compatible with the current version of CppADCodeGen.
You could consider installing the version from 18.04 (https://packages.ubuntu.com/bionic/cppad).

from cppadcodegen.

alexliniger avatar alexliniger commented on June 5, 2024

Installing the 2017 version of CppAD in a local folder as done in the CI of the project and then make CppADCodeGen using cmake -DCPPAD_HOME=$CPPAD_HOME .. solved the issue for me.
But I assume updating to 18.04 is anyhow a good idea.

from cppadcodegen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.