Opened 11 years ago
Last modified 7 years ago
#2651 new defect
Definitions in SimulationRuntime/c/openmodelica.h and SimulationRuntime/c/simulation/solver/libf2c/f2c.h do not match for 64-bit systems
Reported by: | Michael Kloeppel | Owned by: | somebody |
---|---|---|---|
Priority: | normal | Milestone: | Future |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: | Lennart Ochel |
Description
In SimulationRuntime/c/openmodelica.h (line 91) the following definitions can be found
#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) typedef int fortran_integer; typedef unsigned int fortran_uinteger; #else typedef long int fortran_integer; typedef unsigned long int fortran_uinteger; #endif
whereas in SimulationRuntime/c/simulation/solver/libf2c/f2c.h (line 10) the following is defined.
typedef long int integer; typedef unsigned long int uinteger;
When arguments of the type fortran_integer* are passed to functions expecting integer* (as for instance in the dasrt solver) this leads to problems on 64-bit systems, causing for instance the dasrt solver to abort.
Using a newer version of f2c.h fixed the issue for me, but since I'm not sure what other parts depend on the f2c.h header file, I don't want to patch this file right now.
Change History (13)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Cc: | added |
---|
Yes, I'm going to switch to cminpack.
But then there are still two other solvers with f2c dependencies, which are used in our old numerical initialization method. Question is how we should processed with them.
comment:3 by , 11 years ago
Which files do you use that still have f2c dependencies? Maybe we could use them but remove all f2c stuff from them.
comment:4 by , 11 years ago
As far as I see it's only:
SimulationRuntime/c/math-support/nelmead.c
SimulationRuntime/c/math-support/newuoa.c
SimulationRuntime/c/math-support/newuob.c
Yes, I agree it we can just remove the dependencies, it's not that much.
comment:5 by , 11 years ago
I guess there is no need to adjust the old initialization stuff. It will be removed soon anyway.
comment:6 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:7 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:12 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:13 by , 7 years ago
Milestone: | 1.12.0 → Future |
---|
The milestone of this ticket has been reassigned to "Future".
If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.
If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".
In both cases, a short informative comment would be welcome.
Don't touch anything that uses f2c for now. We just got a new non-f2c-based dassl. And as soon as we use cminpack instead of hybrj, we can remove f2c altogether.