Skip to content
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

omc -s --newbackend Modelname.mo uses the old backend. #10142

Closed
casella opened this issue Feb 2, 2023 · 4 comments · Fixed by #10418
Closed

omc -s --newbackend Modelname.mo uses the old backend. #10142

casella opened this issue Feb 2, 2023 · 4 comments · Fixed by #10418
Assignees
Milestone

Comments

@casella
Copy link
Contributor

casella commented Feb 2, 2023

@perost pointed out that running omc -s --newBackend Modelname.mo still used the old backend to compile the code. I have no MWE to prove that, but it should be easy to fix it anyway.

@casella casella added this to the 1.21.0 milestone Feb 2, 2023
@perost perost changed the title omc -s Modelname.mo uses the old frontend by default omc -s Modelname.mo uses the old backend by default Feb 2, 2023
@mahge
Copy link
Contributor

mahge commented Feb 16, 2023

This is a duplicate of #7860. It is just translating a model directly with omc -s ignoring model annotations. I will see what I can do.

@mahge mahge closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
@perost
Copy link
Member

perost commented Feb 16, 2023

This is a duplicate of #7860. It is just translating a model directly with omc -s ignoring model annotations. I will see what I can do.

This has nothing to do with annotations, the issue is that omc -s --newBackend Modelname.mo will still use the old backend since the code in Main doesn't care about the --newBackend flag. The code probably needs to be redesigned quite a lot since it currently uses the old DAE structure everywhere.

@perost perost reopened this Feb 16, 2023
@mahge mahge changed the title omc -s Modelname.mo uses the old backend by default omc -s --newbackend Modelname.mo uses the old backend by default Feb 16, 2023
@mahge
Copy link
Contributor

mahge commented Feb 16, 2023

I see. From the code samples provided in #10126 and the description of this ticket I assumed you were relying on the annotations. We can keep this open then.

@mahge mahge changed the title omc -s --newbackend Modelname.mo uses the old backend by default omc -s --newbackend Modelname.mo uses the old backend. Feb 16, 2023
@perost
Copy link
Member

perost commented Feb 16, 2023

I see. From the code samples provided in #10126 and the description of this ticket I assumed you were relying on the annotations. We can keep this open then.

That's understandable, the description was missing the --newBackend flag but I've added it now.

mahge added a commit to mahge/OpenModelica that referenced this issue Mar 20, 2023
  - Consider `experiment` annotation when using omc on the CLI.
  - Consider `__OpenModelica_commandLineOptions` annotation when using omc on the CLI.
  - Consider flag `--newBackend` when specified on the CLI.

  These have required some restructuring of the translateModel workflow.
  There is still so much more that can be cleaned up and refactored to make
  more sense.

  Fixes OpenModelica#7860.
  Fixes OpenModelica#8122.
  Fixes OpenModelica#10142.
mahge added a commit to mahge/OpenModelica that referenced this issue Mar 20, 2023
  - Consider `experiment` annotation when using omc on the CLI.
  - Consider `__OpenModelica_commandLineOptions` annotation when using omc on the CLI.
  - Consider flag `--newBackend` when specified on the CLI.

  These have required some restructuring of the translateModel workflow.
  There is still so much more that can be cleaned up and refactored to make
  more sense.

  Fixes OpenModelica#7860.
  Fixes OpenModelica#8122.
  Fixes OpenModelica#10142.
mahge added a commit that referenced this issue Mar 25, 2023
Improve handling of CLI and annotation flags/options.

  - Consider `experiment` annotation when using omc on the CLI.
  - Consider `__OpenModelica_commandLineOptions` annotation when using omc on the CLI.
  - Consider flag `--newBackend` when specified on the CLI.

  These have required some restructuring of the `translateModel` workflow. There is still so much more that can be cleaned up and refactored to make  more sense.

  - Fixes #7860.
  - Fixes #8122.
  - Fixes #10142.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants