-
Notifications
You must be signed in to change notification settings - Fork 15
Updating to OMPython 4.0 #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating to OMPython 4.0 #244
Conversation
- OMPython 4.0 no longer provides this function
- Also remove juliacall in non-BaseModelica.jl CI
- New case for docker
941b17f to
7fb29a7
Compare
|
Running the sanity check inside a devcontainer with Ubuntu Noble and installed nightly omc I can reproduce the issue. Looks like simulation result files are missing only for vscode ➜ /workspaces/OpenModelicaLibraryTesting (fixes-ompython-4) $ find . -name "*.mat"
./MyOtherLibrary_1.0.0_MyOtherLibrary.Blocks.Examples.PID_Controller/MyOtherLibrary_1.0.0_MyOtherLibrary.Blocks.Examples.PID_Controller_res.mat
./HelloWorld_res.matRe-running the simulation gives me the same. The simulation is successful, but no result file is generated. $ ./MyLibrary_1.0.0_MyLibrary.Blocks.Examples.PID_Controller -abortSlowSimulation -alarm=480 -lv LOG_STATS
LOG_SUCCESS | info | The initialization finished successfully with 3 homotopy steps.
LOG_STATS | info | ### STATISTICS ###
| | | | | timer
| | | | | | 0.0020718s reading init.xml
| | | | | | 0.0001838s reading info.xml
| | | | | | 9.26e-05s [ 1.9%] pre-initialization
| | | | | | 8.14e-05s [ 1.7%] initialization
| | | | | | 8e-07s [ 0.0%] steps
| | | | | | 0.0009614s [ 20.1%] solver (excl. callbacks)
| | | | | | 0s [ 0.0%] creating output-file
| | | | | | 0.0004292s [ 9.0%] event-handling
| | | | | | 0.0006577s [ 13.8%] overhead
| | | | | | 0.0025565s [ 53.5%] simulation
| | | | | | 0.0047796s [100.0%] total
| | | | | events
| | | | | | 5 state events
| | | | | | 0 time events
| | | | | solver: dassl
| | | | | | 400 steps taken
| | | | | | 537 calls of functionODE
| | | | | | 116 evaluations of jacobian
| | | | | | 18 error test failures
| | | | | | 0 convergence test failures
| | | | | | 0.0002015s time of jacobian evaluation
LOG_SUCCESS | info | The simulation finished successfully. |
- On the CI path to reference files is relative,
but scripts need it to be absolute.
|
This PR is now ready to be merged. But we should wait for a day without a lot of changes to see if any regressions are cause by the script failing or by changes in omc. |
This reverts commit 3aa8a07.
|
|
||
| def omcAssert(omc, cmd, extra=""): | ||
| def omcAssert(omc: OMCSessionZMQ, cmd: str, extra: str = ""): | ||
| res = omc.sendExpression(cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omc.SendExpression() will handle the checking of getErrorString() and pyparsing validation for you; please check agains OMCSessionException; see OMCSession.sendExpression()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case we can simply remove omcAssert.


Issue
Fixes #243.
Purpose
Changes
FindBestOMCSessionimportOMCProcessDocker