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

verify 64 bit compatibility #485

Closed
mwetter opened this issue Feb 11, 2016 · 7 comments · Fixed by #492
Closed

verify 64 bit compatibility #485

mwetter opened this issue Feb 11, 2016 · 7 comments · Fixed by #492
Assignees
Milestone

Comments

@mwetter
Copy link
Member

mwetter commented Feb 11, 2016

Verify that all C code is 64 bit compatible, in particular also externalObjectStructure.h, exchangeValues.h and the cfd interface.

@mwetter mwetter added this to the Release 3.0 milestone Feb 11, 2016
@mwetter
Copy link
Member Author

mwetter commented Feb 23, 2016

According to the Modelica Specification,

Unless an explicit function call is present in the external declaration, an array is passed by its address followed by n arguments of type size_t with the corresponding array dimension sizes, where n is the number of dimensions.

@mwetter
Copy link
Member Author

mwetter commented Feb 23, 2016

@zuowangda

Can you please verify the following:

  • why is there in Buildings/Resources/C-Sources/cfdCosimulation.h a single line
#pragma comment(lib, "user32.lib")

Isn't there a similar statement missing for 64 bit? Does the code work if compiled on Windows on 64 bit?

  • Can you please run for the branch issue485_64bit the regression tests for 32 and 64 bit on Windows and on Linux? On Linux, I get very different results when simulated with 64 bit, even before my changes (using the files from the master branch). The figure below shows the results for the NaturalConvectionWithControl test case with 32 and 64 bit on Linux. The reference results in Resources/ReferenceResults were generated with Linux 32 bit, and correspond to the results that you validated originally. So I think there is a bug in your 64 bit implementation. I suggest you make sure all array sizes use size_t consistently rather than int. You can switch to 64 bit using Advanced.CompileWith64=2; (and back to 32 bit with Advanced.CompileWith64=1;)

naturalconvectionwithcontrol

@mwetter mwetter added the bug label Feb 23, 2016
@mwetter
Copy link
Member Author

mwetter commented Feb 23, 2016

The package Buildings.Fluid.HeatExchangers.Boreholes works on Linux 32 and 64 bit.

@tianwei1989
Copy link
Contributor

Hi Michael,

I am Wei Tian, Dr. Zuo's student. I am following up the issue.
Which version of Dymola are you currently using?

@mwetter
Copy link
Member Author

mwetter commented Feb 25, 2016

@tianwei1989 I am using Dymola 2016 FD01, but I think the problem should be visible also with Dymola 2016.

@tianwei1989
Copy link
Contributor

@mwetter @zuowangda Hi Michael, thank you. I am upgrading my Dymola to 2016 version.

@tianwei1989
Copy link
Contributor

@mwetter @zuowangda Hi Michael I recompiled the 64 bit .so for FFD and the results are identical with 32 bit ones. So, I think something maybe wrong with your compiling. Attached is my result. Since now I have some trouble with my Buildingspy, I will later run a unit test for all CFD examples to see if the results change or not after choose 64 bit.
results

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