[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Help-glpk] "Assertion failed: 1 <= p && p <=T->nslotsErrordetected
From: |
Kelly, Jeff (ON0F) |
Subject: |
RE: [Help-glpk] "Assertion failed: 1 <= p && p <=T->nslotsErrordetected in file ..\src\glpios03.c at line 116" |
Date: |
Fri, 25 Mar 2011 15:03:58 -0400 |
Andrew;
I have one more minor problem related to this.
Now when I check for GLP_IBINGO in my callback routine and it finds an
I-F solution, I then need to write out the variable solution values
calling glp_mip_obj_val() and glp_mip_col_val() using the problem
pointer but unfortunately it returns 0.0 (zeros) for all variables and
objective function.
I must be doing something wrong - any suggestions.
Thanks in advance - Jeff
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Kelly, Jeff (ON0F)
Sent: Friday, March 25, 2011 2:25 PM
To: Andrew Makhorin
Cc: address@hidden
Subject: RE: [Help-glpk] "Assertion failed: 1 <= p && p
<=T->nslotsErrordetected in file ..\src\glpios03.c at line 116"
Andrew;
That was my problem - when I removed the STDCALL it now works great!
Thanks for your help - Jeff
-----Original Message-----
From: Andrew Makhorin [mailto:address@hidden
Sent: Friday, March 25, 2011 2:20 PM
To: Kelly, Jeff (ON0F)
Cc: address@hidden
Subject: RE: [Help-glpk] "Assertion failed: 1 <= p && p <=
T->nslotsErrordetected in file ..\src\glpios03.c at line 116"
On Fri, 2011-03-25 at 13:27 -0400, Kelly, Jeff (ON0F) wrote:
> Andrew;
>
> Thanks.
>
> My callback subroutine shown below in Fortran (sorry) uses the tree as
an integer pointer and passes this to glp_ios_curr_node(). And, even
when glp_ios_curr_node() is not used in the callback subroutine I still
get the assestion failure.
>
> Therefore I take it that I am somehow corrupting the tree structure
inadvertently.
>
> I am wondering if there is anything else I can do? other then chalking
it up as a Fortran to C "inoperability" issue.
>
> Regards, Jeff
>
> subroutine GLPKintsolcb(tree,info)
> cDEC$ ATTRIBUTES DLLEXPORT, STDCALL, REFERENCE, ALIAS : "GLPKINTSOLCB"
:: GLPKINTSOLCB
>
> integer(4), intent(in) :: tree
> cDEC$ ATTRIBUTES REFERENCE :: tree
> integer(4), optional, intent(in) :: info
> cDEC$ ATTRIBUTES REFERENCE :: info
>
> interface
>
> integer(4) function glp_ios_curr_node(tree)
> cDEC$ ATTRIBUTES DLLIMPORT, STDCALL, ALIAS : "_glp_ios_curr_node" ::
glp_ios_curr_node
> integer(4) :: tree
> cDEC$ ATTRIBUTES REFERENCE :: tree
> end function
>
> end interface
>
> !comment write(*,*)glp_ios_curr_node(tree)
>
> end subroutine GLPKintsolcb
>
There is definitely something wrong with parameter passing.
If you are using glpk dll compiled with MSVS, please note that it uses
_cdecl calling convention, not _stdcall.
_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk
- [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Error detected in file ..\src\glpios03.c at line 116", Kelly, Jeff (ON0F), 2011/03/25
- Re: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Error detected in file ..\src\glpios03.c at line 116", Andrew Makhorin, 2011/03/25
- RE: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Errordetected in file ..\src\glpios03.c at line 116", Kelly, Jeff (ON0F), 2011/03/25
- RE: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Errordetected in file ..\src\glpios03.c at line 116", Andrew Makhorin, 2011/03/25
- RE: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslotsErrordetected in file ..\src\glpios03.c at line 116", Kelly, Jeff (ON0F), 2011/03/25
- RE: [Help-glpk] "Assertion failed: 1 <= p && p <=T->nslotsErrordetected in file ..\src\glpios03.c at line 116",
Kelly, Jeff (ON0F) <=
- RE: [Help-glpk] "Assertion failed: 1 <= p && p <=T->nslotsErrordetected in file ..\src\glpios03.c at line 116", Andrew Makhorin, 2011/03/25
- RE: [Help-glpk] "Assertion failed: 1 <= p && p<=T->nslotsErrordetected in file ..\src\glpios03.c at line 116", Kelly, Jeff (ON0F), 2011/03/25