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
Failed to evaluate function: Modelica.Math.Matrices.LAPACK.dhseqr when upgrading to Buildings v10.0.0 #11314
Comments
Fixed in #11315. The Lapack functions are a bit special due to being Fortran functions, so we have some special handling for them in the compiler. Unfortunately this means we need to add the Lapack functions we need in some places in the compiler, and it seems we'd missed dhseqr. I will check if there are any other we've missed too. |
@mahge: Do you know why we can't find Lapack functions when trying to look them up as normal external functions? If we could find them we could probably implement support for calling external Fortran functions too and get rid of all the special handling for Lapack, but we need to at least be able to call the functions to get anywhere. |
Thanks a lot for the quick reply and the fix @perost, highly appreciated!! |
@mwetter FYI. |
I was just wondering the same thing when I saw your changes. I did not know we handled them like that in the FrontEnds. We should be able to under normal circumstances. I am guessing maybe they are handled the way they are handled now because it was implemented a long time ago. If it does not work for some Fortran related reason we also have the option of requiring |
I don't think the fact that they're Fortran functions are the issue. We do need some special handling such as transposing array arguments since Fortran arrays are column-major instead of row-major, but that shouldn't affect the actual calling of the functions. |
The issue should be fixed, but I'll keep this open a while longer since we might want to change how we handle this. |
@perost do you know approximately how much should I wait for your edit to take effect in the nightly compiled version here: https://build.openmodelica.org/apt/dists/focal/nightly/binary-amd64/? |
It seems the Linux builds are currently broken due to some changes we made to the third-party libraries we use, but as soon as that's fixed (hopefully soon) it should be included in the next nightly builds. |
That's great, @perost! thanks for your quick answer once again! |
You can check the status of the Linux nightly builds here: https://test.openmodelica.org/jenkins/job/LINUX_BUILDS/ |
Thanks @casella. That helps a lot! |
All green now. |
Description
At this repository we configure district models using component models from Buildings and IDEASv3.0.0 for a project we are working on. Our testing environment uses Buildingspy with OpenModelica to compile the models and check reference results. The environment is defined in the Dockerfile at this folder, and the InstallThirdPartyLibraries.mos is used to install a specific version of each library dependency: IDEAS and Buildings.
I'm trying to upgrade our testing environment from Buildings 9.1.1. to Buildings 10.0.0., but upon doing so I get the following error when compiling some of our models that I'm not able to circumvent.
See e.g. here.
I've tried the following without success:
dhseqr
was deprecated in the newest versions.release
,stable
, andnightly
versions of OMC.Notice that I get the same error when using an OMEdit installed in Windows connected to OpenModelica v1.21.0-dev-281-g001d260048 (only when switching to Buildings v9.1.1.):
Steps to reproduce
Steps to reproduce using the container image with
omc v1.21.0-1
cd MoPED/Resources/Scripts/tests
make build
MoPED/Resources/Scripts/tests/installThirdPartyLibraries.mos
. The tests will pass when using Buildings 9.1.1, but not when using Buildings 10.0.0.make test-districts
or, alternatively, after building the image:
make run
docker exec -it moped bash
/home/developer/moped
. From there you can try to translate one of the following models (the behavior is the same, but you may want to use the latter one since it's the most lightweight):MoPED.Districts.Examples.Layout3
MoPED.Districts.Examples.Layout4
MoPED.Districts.Examples.Layout4RC
Steps to reproduce using OMEdit in Windows with
OpenModelica v1.21.0-dev-281-g001d260048
MoPED.Districts.Examples.Layout3
MoPED.Districts.Examples.Layout4
MoPED.Districts.Examples.Layout4RC
Version and OS
Additional context
Just as complementary information:
I've opened an issue in lbl-srg/modelica-buildings#3548, but it does not sound familiar to the developers of the Buildings library.
I've also tried to isolate the problem from Modelica in the Docker testing container by using the following Python example which uses the lu decomposition from Lapack:
But when trying to use
dhseqr
in the following example, I get the error below:So it seems there is a general issue with that particular
dhseqr
function from Lapack because I can successfully run some methods from Lapack but not that particular one. However, I would expect that the installation of OpenModelica ensures that its dependencies are covered, which does not seem to be the case here. When installing OpenModelica upon building the Docker image I see the following prompt:Which makes me guess there might be an issue with the dynamic linking of the existing Lapack library in the environment. Could we enforce reinstalling a complete Lapack version for OpenModelica?
The text was updated successfully, but these errors were encountered: