UPPAALModelChecker / UPPAAL-Meta

This is the offcial meta repo for issue reporting, feature request and public roadmap for the development of UPPAAL.
http://www.uppaal.org
1 stars 0 forks source link

Uppaal 5: no connection to engine [ARM64 Ubuntu] #221

Open rgu01 opened 1 year ago

rgu01 commented 1 year ago

Describe the bug When lauching Uppaal 5, it shows "Error: no connection to engine". When reloading, a window pops up saying "Error: server closed connection".

Details of the error: Server closed connection. at com.uppaal.engine.connection.Connection.handshake(Connection.java:33) at com.uppaal.engine.connection.CommandConnection.connect(CommandConnection.java:164) at com.uppaal.engine.connection.LocalConnection.connect(LocalConnection.java:49) at com.uppaal.engine.EngineStub.connect(EngineStub.java:150) at com.uppaal.engine.Engine.connectSync(Engine.java:528) at com.uppaal.engine.Engine.lambda$submit$8(Engine.java:650) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: com.uppaal.engine.EngineInvocationException: Concurrent execution encountered an exception at com.uppaal.engine.Engine.submit(Engine.java:647) at com.uppaal.engine.Engine.submitLicenseLess(Engine.java:637) at com.uppaal.engine.Engine.getSystem(Engine.java:360) at aq.a(Unknown Source) at aq.h(Unknown Source) at aB.actionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2314) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:407) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1029) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1073) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398) at java.desktop/java.awt.Component.processEvent(Component.java:6386) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

To Reproduce Just open Uppaal in Linux by using "./uppaal" in a terminal.

Version(s) of UPPAAL tested Uppaal 5.0

Desktop (please complete the following information):

mikucionisaau commented 1 year ago

Looks like the server cannot be run (the background process performing all the semantic operations). The server binary is compiled for x86_64 (Intel) instruction set and that is probably the reason why it does not start on ARM64 processor.

rgu01 commented 1 year ago

Yes, I think so. Will you publish an ARM64 version in the future?

mikucionisaau commented 1 year ago

Yes, I think so. Will you publish an ARM64 version in the future?

It depends on how popular this platform becomes. May I ask, how much RAM does your ARM64 computer has?

rgu01 commented 1 year ago

My laptop is a Macbook Pro M2 chip, with 16GB memory. I am running Ubuntu ARM64 in VMWare Fusion. The virtual machine has 4 GB memory. Nowadays, only VMWare Fusion supports M1/M2 chips but it only supports ARM architecture builds of Linux. I used to use Linux for Uppaal, for modeling and calling external functions. I don't know if calling external functions and external library for learning is supported in Mac Uppaal.

magoorden commented 1 year ago

Calling external functions works now also properly on macOS. For example, I can use the uppaal-libs library of C-functions directly on macOS. So I personally stepped away from using a virtual Linux to run Uppaal. The only thing to note is that I am still using a MacBook with Intel architecture.

rgu01 commented 1 year ago

Thank you for the information. I will try it out on my M2 Macbook. Also, have you linked an external library for learning in Uppaal Stratego? Uppaal Stratego has builtin functions of Q learning and M learning, and it also supports linking an external library as the learning module for strategy synthesis. I used it in Linux previously. I am not sure if this is supported in Mac Uppaal 5?

magoorden commented 1 year ago

Also, have you linked an external library for learning in Uppaal Stratego?

I have personally never done that. But of course you can give it a try. Otherwise, if you have something publicly available for me to check out on my Intel MacBook, I am happy to try it for you.

rgu01 commented 1 year ago

Thanks! I will try it on my M2 MacBook and get back to this thread to share some experience.

rgu01 commented 1 year ago

Also, have you linked an external library for learning in Uppaal Stratego?

I have personally never done that. But of course you can give it a try. Otherwise, if you have something publicly available for me to check out on my Intel MacBook, I am happy to try it for you.

When you use "external learning library" as the learning method, you will get a popup warning: External learning methods are currently only supported on linux. I hope this function will be supported in other OS and Linux ARM64 soon. :-)

mikucionisaau commented 1 year ago

External learning methods are currently only supported on linux.

Oh, that is not good. I am reopening this issue as it should be trivial to fix it. Also, I am working on the Aarch64 port for Mac and I hope to package it together with x86_64 into "universal" binary.

apferscher commented 11 months ago

Is there an update to a UPPAAL version for Aarch64? I have tried to run UPPAAL 5.0.0 and its beta version 5.1.0 on a Macbook Pro with an M3, but without success.

SwampertX commented 11 months ago

Is there an update to a UPPAAL version for Aarch64? I have tried to run UPPAAL 5.0.0 and its beta version 5.1.0 on a Macbook Pro with an M3, but without success.

5.1.0-beta3 runs fine on my M1 Macbook, upon installing JDK from https://adoptium.net/ per the installation instructions.

apferscher commented 11 months ago

Is there an update to a UPPAAL version for Aarch64? I have tried to run UPPAAL 5.0.0 and its beta version 5.1.0 on a Macbook Pro with an M3, but without success.

5.1.0-beta3 runs fine on my M1 Macbook, upon installing JDK from https://adoptium.net/ per the installation instructions.

Thanks! Using the JDK provided by https://adoptium.net made the difference.