PSOPT / psopt

PSOPT Optimal Control Software
GNU Lesser General Public License v2.1
193 stars 75 forks source link

ADOL-C error: function sparse_jac... #44

Closed susnicek closed 2 years ago

susnicek commented 2 years ago

Dear professor Becerra, today I compiled PSOPT package and installed on my Debian (sid) machine according instructions. Everything went well, the package compiled without any error as well as the examples. However, when I tried to run the "alpine" example, the program terminated with the following runtime error:

ADOL-C error: function sparse_jac can only be used if linked with ColPack terminate called after throwing an instance of 'FatalError' what(): errorcode=-1 function=sparse_jac file=sparsedrivers.cpp line=438 what= Aborted

All the other exmples behaved the same way. Please, help me to solve my problem.

Best regards and thank you in advance, J. Kordik

vmbecerra commented 2 years ago

Hello J Kordik

The solution to your problem is given in the error message that you are getting. You need to link Adol-C with ColPack. Some Linux distributions install ColPack when you install Adol-c. If you compiled your own Adol-c you will need to compile ColPack first, and configure Adol-c to work with ColPack. Some suggestions for doing this are given in the PSOPT documentation.

Best wishes

Victor Becerra

susnicek commented 2 years ago

Dear professor Becerra, thank you for your help! Finally, I managed to solve the problem by uninstalling the deb package libadolc (using apt-get). The cmake script downloads and compiles the adolc automatically and correctly.

Best regards J. Kordik

ecbrown commented 1 year ago

I believe the Debian package rules are missing the --with-colpack=/usr option. I have filed a bug report with Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033472