BYU-PRISM / GEKKO

GEKKO Python for Machine Learning and Dynamic Optimization
https://machinelearning.byu.edu
Other
594 stars 104 forks source link

apm_arm 'corrupted size vs. prev_size' error #141

Closed asf-xyl closed 8 months ago

asf-xyl commented 2 years ago

Calling apm_arm with my model gives the following

 ----------------------------------------------------------------
 APMonitor, Version 0.8.9
 APMonitor Optimization Suite
 ----------------------------------------------------------------

 --------- APM Model Size ------------
 Each time step contains
   Objects      :            1
   Constants    :            0
   Variables    :            8
   Intermediates:            0
   Connections  :            2
   Equations    :            4
   Residuals    :            4

corrupted size vs. prev_size

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
Aborted

The same model seems to work just fine on my Windows PC so I think it is not the model which is corrupt or anything like that.

My arm machine is a Cortex-A8 which reports as armv7l like a raspberry pi (but it's not a raspberry pi) so it's calling the correct binary.

I notice that the apm_arm is version 0.8.9 whereas the other apms are all version 1.0.1. Is it possible that an upgrade to 1.0.1 would solve it?

APMonitor commented 2 years ago

It looks like this could be a glibc error: https://stackoverflow.com/questions/49628615/understanding-corrupted-size-vs-prev-size-glibc-error The upgrade to 1.0.1 may help. We'll release a new version of the ARM Linux binary with the next release of gekko.

asf-xyl commented 2 years ago

I'll certainly give that a try. Do you have an expected timeline for the next release of gekko? Thanks!

APMonitor commented 2 years ago

No specific timeline because we are so busy with current projects. Another option is to run on a local server with Windows or Linux over an Intranet connection: https://apmonitor.com/wiki/index.php/Main/APMonitorServer ARM processors can be very slow (10x times slower). An alternative for MPC applications is to train something like an LSTM controller to emulate the MPC: https://apmonitor.com/pds/index.php/Main/LSTMAutomation and https://apmonitor.com/do/index.php/Main/LSTMNetwork (see exercise 2).

APMonitor commented 8 months ago

A new arm_aarch64 binary is available with gekko v1.0.7 that will be released soon.