[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Errordetecte
From: |
Andrew Makhorin |
Subject: |
RE: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Errordetected in file ..\src\glpios03.c at line 116" |
Date: |
Fri, 25 Mar 2011 21:19:56 +0300 |
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] "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 <=
- 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), 2011/03/25
- 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