BYU-PRISM / GEKKO

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

wrong apm_arm file #147

Closed nunojsa closed 5 months ago

nunojsa commented 2 years ago

Hi guys,

With the latest release I'm seeing two issues when trying to run gekko on arm:

ls -la gekko/bin/
total 28452
drwxr-xr-x 2 nsa nsa    4096 May 16 16:32 .
drwxr-xr-x 5 nsa nsa    4096 May 16 16:32 ..
-rwxr-xr-x 1 nsa nsa 7082704 May 16 16:29 apm
-rw-r--r-- 1 nsa nsa 7082704 May 16 16:32 apm_arm
-rwxr-xr-x 1 nsa nsa 8675840 May 16 16:29 apm.exe
-rwxr-xr-x 1 nsa nsa 6300032 May 16 16:29 apm_mac
-rw-r--r-- 1 nsa nsa     450 May 16 16:32 README.md
[nsa@nsa GEKKO]$ file gekko/bin/apm_arm 
gekko/bin/apm_arm: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=85eaebee6d861ed30de1048279832f4ced869efb, for GNU/Linux 3.2.0, stripped

So you can see that apm_arm is not executable and is a x86 binary... Looking at git history, I see the file was deleted and then added back so I guess we got the wrong one added for arm.

APMonitor commented 2 years ago

We're working on a new version of apm_apm and temporarily replaced it with a copy of the Linux apm. The README.md documentation https://github.com/BYU-PRISM/GEKKO/tree/master/gekko/bin has a similar notice. If you need the old apm_arm then please install with pip install gekko==1.0.2. The old apm_arm executable has dependencies that are creating an error when publishing to conda-forge. We temporarily removed the arm executable (but kept a placeholder) so that it would pass the checks. We should have a new version soon with gekko v1.0.5.

nunojsa commented 2 years ago

Thanks for the info. I could have noticed the readme file before posting the bug.

Anyways, I will have to go back temporarily to 1.0.2 as I need to run in on a rpi.

APMonitor commented 2 years ago

Could you test the new apm_arm file that is in the GitHub repository (not yet published as a new release)? It is located at https://github.com/BYU-PRISM/GEKKO/blob/master/gekko/bin/apm_arm and can be placed in the gekko/bin/ folder.

nunojsa commented 2 years ago

Hi,

So I did a quick try and I can see that I don't have the same results (giving the same inputs) as I had with the binary from v1.0.2...

APMonitor commented 2 years ago

I'm still working on getting the APOPT solver into the latest version. The BPOPT solver is included with the current version. The different solvers may give different results, especially if you have integer variables. APOPT is an MINLP solver and BPOPT is an NLP solver only. If you don't have integer variables then the solutions should match if there is a successful solution reported and the problem is non-convex.

nunojsa commented 2 years ago

The different solvers may give different results, especially if you have integer variables

This might explain it since I'm working with integers. Just let me know when when there's any update that I can try...

APMonitor commented 5 months ago

A new apm_aarch64 executable will be available with gekko v1.0.7.