How to watch the running process while running it locally

33 views
Skip to first unread message

zhhhhh1...@gmail.com

unread,
Dec 10, 2021, 10:03:11 AM12/10/21
to apmonitor
Dear John,
I run my code when set remote = True, I often face an error that out of memory, it is noticable that sometime it can work, but most of time it will raise an error of out of memory, I can't figure it out.
So I try to run it locally, but when remote = False, I can't watch the runing process of each iteration as running online. Is there any method that can let me watch the running process while running it locally?

Yours,
Sincerely.

John Hedengren

unread,
Dec 10, 2021, 10:12:55 AM12/10/21
to APM Google Groups
The server was really loaded when I checked today. It has 64 GB of memory, but it was all used and going into swap space. One option is to set up a local server, even on your own computer for Windows or Linux:


Switch gekko to remote=True and server='http://127.0.0.1' (localhost) with m = GEKKO(remote=True,server='http://127.0.0.1'). This will run the apm process on your local computer. You should upgrade the binary files on the server from the ones found in gekko. My local binaries are found in C:\Users\johnh\anaconda3\Lib\site-packages\gekko\bin

apm = linux binary
apm.exe = windows binary
apm_arm = linux ARM processor (Raspberry Pi, etc)
apm_mac = MacOS binary

You can also set up a separate server on your LAN. Just update the IP address to your local machine such as server='http://10.0.0.10'.

-John Hedengren



--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apmonitor/6a9f6117-ce81-479e-a2ee-ea18884b5f31n%40googlegroups.com.


--
Best regards,

John Hedengren
GEKKO Optimization Suite

zhhhhh1...@gmail.com

unread,
Dec 12, 2021, 9:51:46 AM12/12/21
to apmonitor
Another problem is , I try to install apmonitor on a Windows server.
I did all steps as your vedios, and if I enter "127.0.0.1" or "127.0.0.1/ip.php", I can get the same results as the vedio shows, but when I run the code, it still raise the error that "Failed to connect the server". I can't figure out why it happens.(I already start the httpd.exe)

Yours,
Sincerely
Reply all
Reply to author
Forward
0 new messages