help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] [Fwd: Problem with GLPK when trying to find value functi


From: Robbie Morrison
Subject: Re: [Help-glpk] [Fwd: Problem with GLPK when trying to find value functions]
Date: Fri, 27 Jul 2012 07:38:33 +1200
User-agent: SquirrelMail/1.4.22

Hello again Sergey

------------------------------------------------------------
To:           Robbie Morrison <address@hidden>
Subject:      Re: [Help-glpk] [Fwd: Problem with GLPK when trying to find
value functions]
Message-ID: 
<address@hidden>
From:         Sergey Kuznetsov <address@hidden>
Date:         Thu, 26 Jul 2012 18:58:53 +0000
------------------------------------------------------------

>>If you want to run local files, use: $ ./test
>
> This is exactly what I'm doing, I didn't know that
> valgrind argument is supposed to be "./test" , not just
> "test" (to be honest I prefer make and scripts to run
> programs).

You need exactly the same call you would use without
'valgrind'.  All normal PATH rules apply.

Scripts are a good way to ensure repeatability and
convenience.  I take it you use 'git', or some other
version control system, so you can back track easily.

> Another update: I tried to run my binary without
> valgrind for different instances and have found that I
> have memory issues with lattices [0;4]^3 and [0;5]^3
> but the program works fine for bigger lattices as well,
> for example [0;6]^3, and even for [0;20]^3 (21^3 LP
> problems and it still works!).  To be more precise, my
> right-hand side set is integer lattice {0, 1, 2, ....,
> span}^3 and when I'm using span=4 or 5 I have memory
> issue, but it's OK with span>=6. So, in the end of the
> day, there is something "magic" about "4" and "5". And
> those instances are well done in bigger lattices (
> i.e. [0;7]^3 ) But for lattices [0;4]^3 and [0;5]^3
> valgrind is helpful.  If anybody has any thoughts about
> this "magic", maybe some generic, high level ideas
> (issues with alignment or addressing), what can be
> peculiar about "4" and "5", please share with me.  And
> so far so good, I think problem solved.

I'd say these occurrences are client code issues.  :)

You probably need to write some code to confirm each
solver call is satisfactory and if not, write the
problem instance to file (as Andrew suggested) and then
halt.  Then run the problem instance by hand from
GLPSOL.  I do this in my project and it works well.  In
particular, examine the KKT conditions -- you can recover
these either via the API or via GLPSOL output.

Check you pointer usage very carefully.  Lots of
potential for shooting oneself in the foot here!

> Thanks everybody who answered, it was really helpful !
> and THANKS to GNU project!!!
>
> Sergey
>
> On Thu, Jul 26, 2012 at 6:09 PM, Robbie Morrison
<address@hidden>wrote:

[snip]

HTH, Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred)           : address@hidden
[from Webmail client]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]