Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

MDT connection to OMC

MDT connection to OMC

I am using Eclipse with the latest version of MDT.   OMC does not appear to be found although the environment variables are set such that OMEdit works.   The message on the Eclipse status bar is "OpenModelica Compiler null is online".

I am using OSX 10.6.6

A copy of the report from Eclipse is attached.

Appreciate any advice.


Regards,
Lewis

Wombat:~ lewis$ $OPENMODELICAHOME
-bash: /opt/local/: is a directory
Wombat:~ lewis$ $OPENMODELICALIBRARY
-bash: /opt/local/lib/omlibrary/msl32/: is a directory


Wombat:~ lewis$ /Applications/Eclipse/Eclipse.app/Contents/MacOS/eclipse
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Using OPENMODELICAHOME environment variable to find omc-binary
OMCSTATUS: No omc binary at: [/opt/local/omc]
OMCSTATUS: Using omc-binary at '/opt/local/bin/omc'
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: Running command: /opt/local/bin/omc +c=mdt +d=interactiveCorba +g=MetaModelica
OMCSTATUS: Setting working directory to: /opt/local
OMCSTATUS: Command run successfully.
OMCSTATUS: Waiting for OMC CORBA object reference to appear on disk.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
Created server.
Dumped Corba IOR in file: /var/folders/Cu/CurnYirfFT4kxVXSwUVsQE+++TI/-Tmp-//openmodelica.lewis.objid.mdt
Started the Corba ORB thread with id: 0x1077d4000
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
org.modelica.mdt.core.compiler.ConnectException: Unable to read OpenModelica Compiler CORBA object from /tmp/openmodelica.lewis.objid.mdt
    at org.modelica.mdt.omc.OMCProxy.readObjectFromFile(OMCProxy.java:191)
    at org.modelica.mdt.omc.OMCProxy.init(OMCProxy.java:474)
    at org.modelica.mdt.omc.OMCProxy.sendExpression(OMCProxy.java:558)
    at org.modelica.mdt.omc.OMCProxy.loadSourceFile(OMCProxy.java:854)
    at org.modelica.mdt.omc.OMCProxy.loadSourceFile(OMCProxy.java:1)
    at org.modelica.mdt.core.CompilerProxy.loadSourceFile(CompilerProxy.java:207)
   
***********************
lines edited out
***********************

OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
org.modelica.mdt.core.compiler.ConnectException: Unable to read OpenModelica Compiler CORBA object from /tmp/openmodelica.lewis.objid.mdt
    at org.modelica.mdt.omc.OMCProxy.readObjectFromFile(OMCProxy.java:191)
    at org.modelica.mdt.omc.OMCProxy.init(OMCProxy.java:474)
    at org.modelica.mdt.omc.OMCProxy.sendExpression(OMCProxy.java:558)
    at org.modelica.mdt.omc.OMCProxy.loadSourceFile(OMCProxy.java:854)
    at org.modelica.mdt.omc.OMCProxy.loadSourceFile(OMCProxy.java:1)
    at org.modelica.mdt.core.CompilerProxy.loadSourceFile(CompilerProxy.java:207)

***********************
lines edited out
***********************
   
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.lewis.objid.mdt'.
OMCSTATUS: The OMC Corba object reference file has not been modified in 100 seconds; we give up starting OMC.

Re: MDT connection to OMC

It seems MDT won't look in the TEMPDIR or TMPDIR folder, whatever it was on OSX current/smile
You could try unsetting that env.var before starting eclipse, or ask Adrian to fix the bug.

Re: MDT connection to OMC

Thanks.  Unsetting TMPDIR gets it to work.  I will advise Adrian.

Re: MDT connection to OMC

Hello!

I'm facing the same problem with md and eclipset: "OpenModelica Compiler null is Online"
I'm working on Ubuntu 10.10, and i don't see any TMPDIR or something like that in order to be unsetting.
I'm not a power user in linux systems, nevertheless OMEdit, OMshell works, and i've set my OPENMODELICAHOME variable to

Code:

/usr/lib

where it can find omc and my eclipse configuration is good.

Thank you for any of your help!

Here's the log when i start eclipse:

Code:

OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.mikaOM.objid.mdt'.

OMCSTATUS: No OMC object reference found, starting server.
OMCSTATUS: Using OPENMODELICAHOME environment variable to find omc-binary
OMCSTATUS: Environment variable OPENMODELICAHOME not set, don't know how to start OMC from standard path.
OMCSTATUS: Will look for OMC object reference in '/tmp/openmodelica.mikaOM.objid.mdt'.
Unable to parse list: Empty list: []
Unable to parse list: Empty list: []
Unable to parse list: Empty list: []
Unable to parse list: Empty list: []
org.modelica.mdt.core.compiler.UnexpectedReplyException: Unable to parse list: Empty list: []
    at org.modelica.mdt.omc.OMCProxy.loadSourceFile(OMCProxy.java:883)
    at org.modelica.mdt.omc.OMCProxy.loadSourceFile(OMCProxy.java:1)
    at org.modelica.mdt.core.CompilerProxy.loadSourceFile(CompilerProxy.java:207)
    at org.modelica.mdt.core.builder.SyntaxChecker.loadFileAndReportErrors(SyntaxChecker.java:539)
    at org.modelica.mdt.internal.core.ModelicaSourceFile.loadElements(ModelicaSourceFile.java:128)
    at org.modelica.mdt.internal.core.ModelicaSourceFile.getChildren(ModelicaSourceFile.java:115)
    at org.modelica.mdt.ui.view.ModelicaContentOutlinePage$ChildrenProvider.getChildren(ModelicaContentOutlinePage.java:175)
    at org.modelica.mdt.ui.view.ModelicaContentOutlinePage$ChildrenProvider.getElements(ModelicaContentOutlinePage.java:193)

***
lines edited out
***

and here a copy of what we can find in /tmp directory (don't know if it could help)

Code:

openmodelica.mikaOM.objid.OMEdit1048b6a4032d6e15be132584614565585800000013900037113546575

openmodelica.mikaOM.omc.output.OMEdit

Re: MDT connection to OMC

Instead of setting your OPENMODELICAHOME (which you didn't set; you need to set it in a terminal and then launch eclipse from that environment), you could simply point to the omc executable /usr/bin/omc instead. OpenModelica is compiled with its prefix hardcoded so it knows where to look without environment variable magic.

Re: MDT connection to OMC

That works!
Thank you a lot for your answer and for the explanations!

There are 0 guests and 0 other users also viewing this topic