Open todorvelichkov opened 9 months ago
Thanks for including the follow-up comment. The executable for aarch64
will be available with the new release. Could you also try:
pip install https://github.com/BYU-PRISM/GEKKO/archive/master.zip
Include ---upgrade
if there is an existing installation. The new release has a version that should run on the 64-bit ARM processors. It appears that there is still a problem with Graviton2
CPU. I'll leave this issue open until it is resolved.
One way around this is to set up your own APM Linux server on Amazon and then use m=gekko(remote=True,server='http://10.0.0.10')
and replace the IP address with the AWS EC2 server address. Another option is to use m=gekko(remote=True)
and the public server will perform the calculations if it isn't overloaded.
Could you also try:
pip install https://github.com/BYU-PRISM/GEKKO/archive/master.zip
I'm not sure why, but for some reason there is no apm_aarch64
file if I install the package that way. Here is how the installation log looks like (there is no previous installation, because I uninstall it).
$ pip install --upgrade https://github.com/BYU-PRISM/GEKKO/archive/master.zip
Collecting https://github.com/BYU-PRISM/GEKKO/archive/master.zip
Downloading https://github.com/BYU-PRISM/GEKKO/archive/master.zip
\ 16.6 MB 8.9 MB/s 0:00:02
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.8 in /srv/.virtualenvs/python3.11/lib/python3.11/site-packages (from gekko==1.0.7) (1.26.4)
Building wheels for collected packages: gekko
Building wheel for gekko (setup.py) ... done
Created wheel for gekko: filename=gekko-1.0.7-py3-none-any.whl size=12228119 sha256=25dc12453d7167e213aa35f83268531ee4c441a02a8a9ed09c07f30e2e7627e7
Stored in directory: /tmp/pip-ephem-wheel-cache-rci880bn/wheels/79/0e/ba/0dec06fd0e989c0464e1e0e41257721b8e99ba171d03bf80c2
Successfully built gekko
Installing collected packages: gekko
Successfully installed gekko-1.0.7
The error after that is that the apm_aarch64
file is missing.
Traceback (most recent call last):
# ...
model.solve(disp=False)
File "/srv/.virtualenvs/python3.11/lib/python3.11/site-packages/gekko/gekko.py", line 2123, in solve
app = subprocess.Popen([apm_exe, self._model_name], stdout=subprocess.PIPE, \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/srv/.virtualenvs/python3.11/lib/python3.11/site-packages/gekko/bin/apm_aarch64'
This is how the bin
folder looks like:
$ ls -l /srv/.virtualenvs/python3.11/lib/python3.11/site-packages/gekko/bin/
total 23340
-rwxrwxr-x 1 ubuntu ubuntu 7082704 Feb 20 07:24 apm
-rwxrwxr-x 1 ubuntu ubuntu 8675840 Feb 20 07:24 apm.exe
-rw-rw-r-- 1 ubuntu ubuntu 1830772 Feb 20 07:24 apm_arm
-rwxrwxr-x 1 ubuntu ubuntu 6300032 Feb 20 07:24 apm_mac
One way around this is to set up your own APM Linux server on Amazon and then use m=gekko(remote=True,server='http://10.0.0.10') and replace the IP address with the AWS EC2 server address. Another option is to use m=gekko(remote=True) and the public server will perform the calculations if it isn't overloaded.
We will probably try to do that.
The new release has a version that should run on the 64-bit ARM processors. It appears that there is still a problem with Graviton2 CPU. I'll leave this issue open until it is resolved.
I will try to help with whatever I can until the issue is resolved.
Thanks for reporting that. I needed to include apm_aarch64
in the setup.py
file so now it lists the extra files that should be included with the pip
install:
extra_files = gui_files + ['bin/apm.exe','bin/apm','bin/apm_aarch64','bin/apm_arm','bin/apm_mac']
From your prior message, it sounds like we still need a custom executable for Graviton2
CPUs anyway. I've added this issue as a bug report to be resolved for a future release.
On AWS
t4g.medium
machine withGraviton2
CPU we are getting the following error:The model initialization looks like this:
The
OS
isUbuntu 22.04.2 LTS
, Python is3.11.7
andgekko==1.0.6
Any help would be appreciated.
UPDATE
I found issue #160, tried to install
gekko
with the following command:pip install -e git+https://github.com/BYU-PRISM/GEKKO.git@e6c8121015611907003f86cffdc9d8ad11d6da3d#egg=gekko
After that I got:
so I updated the permissions of the
apm_aarch64
because they looked like this:but now I'm getting:
This is how the folder looks like: