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
  • Index
  • » Users
  • » martinm
  • » Profile

Posts

Posts

How have others gotten everything to work on Mac OS X?  Or is the patch you suggest an easy thing to do?

without unsetting the TMPDIR environment variable I can't even get the OMC to load in Eclipse correctly.  What do you suggest?

Thanks,
Martin

After a lot of work getting OMC working correctly in Eclipse with MDT, I think I'm close.  I can load my mo file, load a model and check the model.  However, when I try to simulate it I get the following error:
omc> simulate(RLCcircuit, startTime=0, stopTime=20, numberOfIntervals=100)
record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 20.0, numberOfIntervals = 100, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'RLCcircuit', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false",
    messages = "Simulation failed for model: RLCcircuit
ERROR: Error writing to file RLCcircuit.cpp.
ERROR: Error writing to file RLCcircuit_functions.h.
ERROR: Error writing to file RLCcircuit_functions.cpp.
ERROR: Error writing to file RLCcircuit_records.c.
ERROR: Error writing to file RLCcircuit.makefile.
ERROR: Error writing to file RLCcircuit_init.txt.
ERROR: Error writing to file RLCcircuit.libs.
Error: Error building simulator. Buildlog: command g++ not found. Check $OPENMODELICAHOME
Error: Error building simulator. Buildlog: command \"/opt/openmodelica/share/omc/scripts/Compile\" not found. Check $OPENMODELICAHOME
",
    timeFrontend = 0.0,
    timeBackend = 0.0,
    timeSimCode = 0.0,
    timeTemplates = 0.0,
    timeCompile = 0.0,
    timeSimulation = 0.0,
    timeTotal = 0.0
end SimulationResult;
omc>

This if from within the OpenModelica Console within Eclipse version 3.6 running on Mac OS X.  I've installed openmodelica using the binary download so it's in /opt/openmodelica/ and has no spaces in the path.  I verified that the Compile script exists in the expected location (it does).  I also have g++ installed as part of the xcode install.  Running which g++ gets me:

/usr/bin/g++


Any help would be greatly appreciated as I've spent about a day getting MDT/OMC/etc. to this point and I feel I'm really close.  BTW, for those trying to get all this working on Mac OS X with OMC 1.6.0 and Eclipse, you need to set the OPENMODELICAHOME var such that eclipse recognizes it and you need to unset TMPDIR otherwise MDT will not correctly find and use OMC.

Thanks,
Martin

  • Index
  • » Users
  • » martinm
  • » Profile
You are here: