[Csdp] Sparse Formulation and Solver

Duro, Joao j.a.duro at cranfield.ac.uk
Mon May 16 09:39:14 EDT 2011


Thanks for your quick reply.

With the trunk version I got:
C block 1, blocksize, 3
C is not symmetric, 1, 1, 2

So I realized that I was only initializing the upper diagonal part of matrix C.
So I replaced:
for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
        C.blocks[1].data.mat[ijtok(i+1,j+1,size)] = c[(size * i) + j];
    }
}

So basically j=0 solves the problem.

I wonder if you are so responsive to external queries like mine, how much would your students be benefiting.

Thanks again,
Joao

________________________________________
From: Brian Borchers [borchers at nmt.edu]
Sent: 16 May 2011 13:32
To: Duro, Joao
Cc: csdp at list.coin-or.org
Subject: Re: [Csdp] Sparse Formulation and Solver

On Mon, May 16, 2011 at 5:23 AM, Duro, Joao <j.a.duro at cranfield.ac.uk<mailto:j.a.duro at cranfield.ac.uk>> wrote:

4) I have also managed to do the same with the (C subroutine interface) but it required a consecutive call to write_prob (line 144) and read_prob (line 146) before calling initsoln (line 152) and easy_sdp (line 153). The obtained result is this (http://pastebin.com/032r09y4).

5) If I remove write_prob (line 144) and read_prob (line 146) from the code I get (http://pastebin.com/SNDqfnzc). I guess this is due to bad initialized variables (could be C, b or constraints). I have also looked into how readprob.c initializes the variables but I could not find a difference, but clearly there must be some.


This is an indication that you've made some sort of error in setting up the problem data structures that are passed into easy_sdp.

If you haven't already done so, you should get the latest (trunk) version of CSDP and use it- this version has enhanced error checking that can help in spotting these problems.  I'll take a closer look at your C code to see if I can find the problem.

--
Brian Borchers                          borchers at nmt.edu<mailto:borchers at nmt.edu>
Department of Mathematics      http://www.nmt.edu/~borchers/<http://www.nmt.edu/%7Eborchers/>
New Mexico Tech                       Phone: (575) 322-2592
Socorro, NM 87801                   FAX: (575) 835-5366




More information about the Csdp mailing list