BYU-PRISM / GEKKO

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

Usage on ARM 64 (Zynq Ultrascale+) #137

Closed NuclearInstruments closed 5 months ago

NuclearInstruments commented 2 years ago

Hi, I would like to use this package to solve a non linear, integer only problem I tried it on my pc. It works very well and I would like to use it on the embedded system we are designing. It is based on ARM64. It is a Soc Zynq Ultrascale+ Where can I find the source code for the bin apm? Can you provide the procedure you follow to make it work on the Raspberry? It would possible to replicate the same procedure for the Zynq with the correct toolchain. I can than share the executable in order to make the library usable on Zynq Ultrascale +

Thank You Andrea

APMonitor commented 2 years ago

There is an ARM64 binary available in the bin folder. Could you try it to see if it works for this platform? The source code for the apm executable is not available but we do try to provide binaries for every common platform. If the device is connected to the Internet then you can also point to a public server or else set up a local APMonitor server (Windows or Linux) for the compute engine: https://apmonitor.com/wiki/index.php/Main/APMonitorServer Most IoT devices are connected to the Internet or Intranet so this framework allows the heavy computations to be performed remotely or nearby locally.

NuclearInstruments commented 2 years ago

Unfortunately there is no possibility for us to be online. I try with the ARM64 binary and i let you know

NuclearInstruments commented 2 years ago

Hi, I tried the apm_arm but i think is 32 bit or for a core that is different from the ARM used for the Zynq Ultrascale+. If you can cross compile I can provide you the toolchain. Thank you Andrea

APMonitor commented 2 years ago

Andrea - could you try running ./apm from the command line and send any messages? The ARM processor may be different, as you mentioned. I typically acquire the different platforms for each so that a new version can be compiled for each. In this case, the board looks somewhat specialized. If you are open to sending a board, I could compile it for that specific platform for the current and future releases. Also note that the ARM processor version has some issues with mixed FORTRAN / C++ needed to compile the executable. I typically only include the APOPT and BPOPT solvers because the IPOPT solver has some problems with cross-compiler compatibility with the current gfortran / gcc releases for that executable. I'm not confident that I could provide a local version with the IPOPT solver.

APMonitor commented 5 months ago

A new aarch64 binary will be released with gekko v1.0.7.