-
Notifications
You must be signed in to change notification settings - Fork 296
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
Fix Cpp writeLhsCref to not use ArraySliceConst on lhs #7648
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Call 'daeExpCref(isLhs=true, ...)' instead of 'daeExpCrefRhs(...)' in scalarLhsCref. See e.g. PowerSystems.Examples.AC3ph.Precalculation.TransDatFromEqCirc raising: ERROR : init : SimManager: Can't assign array to ArraySliceConst
rfranke
added
bug
COMP/SimRT/C
Issues and pull requests related to C simulation runtime.
labels
Jul 3, 2021
adrpo
pushed a commit
to adrpo/OpenModelica
that referenced
this pull request
Jul 5, 2021
…7648) * Fix Cpp writeLhsCref to not use ArraySliceConst on lhs Call 'daeExpCref(isLhs=true, ...)' instead of 'daeExpCrefRhs(...)' in scalarLhsCref. See e.g. PowerSystems.Examples.AC3ph.Precalculation.TransDatFromEqCirc raising: ERROR : init : SimManager: Can't assign array to ArraySliceConst * Whitespaces
adrpo
added a commit
that referenced
this pull request
Jul 6, 2021
* fix issues with OpenSuse (#7636) - installs liblpsolve55 in lib64, fix the copy - add the path to ffi include when building the Compile runtime to fix: ./../../3rdParty/libffi/install/include/ffi.h:58:10: error: 'ffitarget.h' file not found with <angled> include; use "quotes" instead * Flattening fixes (#7626) - Flatten types in statements. - Flatten expressions after evaluating bindings in EvaluateConstants, since they come from the instance tree and not the flat model. - Create typed bindings instead of flat bindings in some places where the generated binding might not actually be flat. - Lift the result in evalComponentBinding if necessary to ensure it has the same dimensions as the cref being evaluated. - Apply the array hack for dimensions in Dimension.fromExp instead of during typing to simplify problematic dimensions in more cases. - Don't double delete components. * Fix loading of subpackages in case of encryption (#7639) * Fix loading of subpackages in case of encryption * Return the class parts * Expand calls with multiple iterators (#7642) - Expand reductions/array constructors with multiple iterators into nested calls when generating the DAE structure, since the code generation can't handle multiple iterators. * Simplify min/max reductions more (#7644) - Evaluate min/max reductions if possible. - Fix Expression.typeOf for relations, to avoid using the wrong default value when evaluating reductions. * Fix product in old frontend (#7646) - Don't expand product of an expression with unknown dimensions. * Implement product operator and DIV_SCALAR_ARRAY in Cpp runtime (#7641) * Implement product operator in Cpp runtime * Update OMCompiler/SimulationRuntime/cpp/Core/Math/ArrayOperations.cpp Co-authored-by: phannebohm <phannebohm@fh-bielefeld.de> * Update test * Implement DIV_SCALAR_ARRAY in Cpp runtime See e.g. PowerSystems.Examples.AC3ph.Precalculation.EqCircFromTransDat Co-authored-by: phannebohm <phannebohm@fh-bielefeld.de> * Implement const element access in DynArrayDim3 (#7647) See e.g. PowerSystems.Examples.AC3ph.Precalculation.EqCircFromTransDat * Fix Cpp writeLhsCref to not use ArraySliceConst on lhs (#7648) * Fix Cpp writeLhsCref to not use ArraySliceConst on lhs Call 'daeExpCref(isLhs=true, ...)' instead of 'daeExpCrefRhs(...)' in scalarLhsCref. See e.g. PowerSystems.Examples.AC3ph.Precalculation.TransDatFromEqCirc raising: ERROR : init : SimManager: Can't assign array to ArraySliceConst * Whitespaces * Fix initialization of reductions in Cpp runtime (#7650) * Fix initialization of reductions in Cpp and C runtime `foldExpPre` had been declared but not used. This resulted in Cpp errors. See e.g. ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpCharacteristics or PowerSystems.Examples.AC3ph.Precalculation.Z_matrixTrDat3 ERROR : init : SimManager: Right and left array must have the same size for element wise addition * Revert fix of initialization of reductions for C runtime * Don't dump equations into Cpp FMU sources (#7643) * Fix empty array slices in Cpp runtime (#7649) * Fix empty array slices in Cpp runtime `stop=0` in `start:step:stop` was used to mark `end` so far. It is needed for empty slices though. See e.g. ModelicaTest.Math.TestMatrices2b (MSL 4.0.0) raising ERROR : init : SimManager: Wrong slice exceeding array size * Add missing access operators for 3-5 dims to ArraySliceConst * Prevent reduction of ArraySlice for index set of size 1 * Fix unlifting of array types in ffi runtime (#7638) Co-authored-by: perost <perost86@gmail.com> Co-authored-by: Adeel Asghar <adeel.asghar@liu.se> Co-authored-by: rfranke <rfranke@users.noreply.github.com> Co-authored-by: phannebohm <phannebohm@fh-bielefeld.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Call
daeExpCref(isLhs=true, ...)
instead ofdaeExpCrefRhs(...)
in scalarLhsCref.See e.g. PowerSystems.Examples.AC3ph.Precalculation.TransDatFromEqCirc raising: