[Csdp] Using cblas and clapack with CSDP

Henri Kjellberg henrikjellberg at gmail.com
Sun Nov 7 22:11:28 EST 2010


Apparantly, the error occurs in easysdp.c

  free(workvec4);
   free(workvec5); <------ this line is where the code stops.
   free(workvec6);
   free(workvec7);
   free(workvec8);
   free(rhs);
   free(dy);
   free(dy1);
   free(Fp);
   free(O);
   free(diagO);
   free(byblocks);


On Sun, Nov 7, 2010 at 8:17 PM, Henri Kjellberg <henrikjellberg at gmail.com>wrote:

> Hi,
>
> I have been able to get the example code to execute however it seems to not
> be perfectly happy here is the output when I tried to execute ./example
>
> root at ubuntu:/opt/Csdp-6.1.1/example# ./example
> Iter:  0 Ap: 0.00e+00 Pobj:  3.0434379e+02 Ad: 0.00e+00 Dobj:
>  0.0000000e+00
> Iter:  1 Ap: 5.57e-01 Pobj:  1.2392573e+02 Ad: 8.57e-01 Dobj:
>  3.3873125e+01
> Iter:  2 Ap: 5.91e-01 Pobj:  4.4688559e+01 Ad: 1.00e+00 Dobj:
>  7.2128795e+01
> Iter:  3 Ap: 1.65e-02 Pobj:  4.3979696e+01 Ad: 1.00e+00 Dobj:
>  9.0347493e+01
> Iter:  4 Ap: 1.57e-02 Pobj:  4.3315315e+01 Ad: 1.00e+00 Dobj:
>  1.1978791e+02
> Iter:  5 Ap: 4.98e-01 Pobj:  2.2831612e+01 Ad: 1.00e+00 Dobj:
>  2.1875630e+02
> Iter:  6 Ap: 6.91e-01 Pobj:  8.0668171e+00 Ad: 1.00e+00 Dobj:
>  2.8249267e+02
> Iter:  7 Ap: 2.00e-02 Pobj:  7.9342969e+00 Ad: 1.00e+00 Dobj:
>  2.6557930e+02
> Iter:  8 Ap: 1.92e-02 Pobj:  7.8099083e+00 Ad: 1.00e+00 Dobj:
>  2.5983512e+02
> Iter:  9 Ap: 7.21e-01 Pobj:  3.2291368e+00 Ad: 1.00e+00 Dobj:
>  2.5117984e+02
> Iter: 10 Ap: 9.50e-01 Pobj:  1.5471455e+00 Ad: 1.00e+00 Dobj:
>  1.3933178e+02
> Iter: 11 Ap: 1.00e+00 Pobj:  1.4724451e+00 Ad: 9.68e-01 Dobj:
>  4.6961726e+01
> Iter: 12 Ap: 1.00e+00 Pobj:  1.5142991e+00 Ad: 1.00e+00 Dobj:
>  1.6000624e+01
> Iter: 13 Ap: 1.00e+00 Pobj:  1.6405417e+00 Ad: 1.00e+00 Dobj:
>  6.8112636e+00
> Iter: 14 Ap: 9.00e-01 Pobj:  1.9200607e+00 Ad: 1.00e+00 Dobj:
>  4.0502644e+00
> Iter: 15 Ap: 8.44e-01 Pobj:  2.3090128e+00 Ad: 1.00e+00 Dobj:
>  3.2977094e+00
> Iter: 16 Ap: 7.12e-01 Pobj:  2.5196314e+00 Ad: 8.44e-01 Dobj:
>  2.9513785e+00
> Iter: 17 Ap: 1.00e+00 Pobj:  2.6624776e+00 Ad: 1.00e+00 Dobj:
>  2.8157451e+00
> Iter: 18 Ap: 9.72e-01 Pobj:  2.7216848e+00 Ad: 8.32e-01 Dobj:
>  2.7723998e+00
> Iter: 19 Ap: 1.00e+00 Pobj:  2.7394969e+00 Ad: 9.59e-01 Dobj:
>  2.7553363e+00
> Iter: 20 Ap: 9.78e-01 Pobj:  2.7467939e+00 Ad: 1.00e+00 Dobj:
>  2.7512488e+00
> Iter: 21 Ap: 9.06e-01 Pobj:  2.7490423e+00 Ad: 1.00e+00 Dobj:
>  2.7502901e+00
> Iter: 22 Ap: 1.00e+00 Pobj:  2.7493223e+00 Ad: 1.00e+00 Dobj:
>  2.7502696e+00
> Iter: 23 Ap: 1.00e+00 Pobj:  2.7494842e+00 Ad: 1.00e+00 Dobj:
>  2.7502046e+00
> Iter: 24 Ap: 1.00e+00 Pobj:  2.7495981e+00 Ad: 1.00e+00 Dobj:
>  2.7501589e+00
> Iter: 25 Ap: 1.00e+00 Pobj:  2.7498852e+00 Ad: 8.39e-01 Dobj:
>  2.7500624e+00
> Iter: 26 Ap: 1.00e+00 Pobj:  2.7499676e+00 Ad: 9.34e-01 Dobj:
>  2.7500143e+00
> Iter: 27 Ap: 9.67e-01 Pobj:  2.7499915e+00 Ad: 1.00e+00 Dobj:
>  2.7500019e+00
> Iter: 28 Ap: 9.26e-01 Pobj:  2.7499975e+00 Ad: 1.00e+00 Dobj:
>  2.7500007e+00
> Iter: 29 Ap: 9.49e-01 Pobj:  2.7499992e+00 Ad: 1.00e+00 Dobj:
>  2.7500002e+00
> Iter: 30 Ap: 9.34e-01 Pobj:  2.7499998e+00 Ad: 1.00e+00 Dobj:
>  2.7500001e+00
> Iter: 31 Ap: 9.74e-01 Pobj:  2.7499999e+00 Ad: 1.00e+00 Dobj:
>  2.7500000e+00
> Iter: 32 Ap: 6.99e-01 Pobj:  2.7500000e+00 Ad: 8.53e-01 Dobj:
>  2.7500000e+00
> Success: SDP solved
> Primal objective value: 2.7500000e+00
> Dual objective value: 2.7500000e+00
> Relative primal infeasibility: 9.70e-17
> Relative dual infeasibility: 7.20e-11
> Real Relative Gap: 3.79e-09
> XZ Relative Gap: 3.82e-09
> DIMACS error measures: 1.05e-16 0.00e+00 2.12e-10 0.00e+00 3.79e-09
> 3.82e-09
> *** glibc detected *** ./example: free(): invalid next size (fast):
> 0x000000000143dd90 ***
> ======= Backtrace: =========
> /lib/libc.so.6(+0x775b6)[0x7f3c165b45b6]
> /lib/libc.so.6(cfree+0x73)[0x7f3c165bae53]
> ./example[0x402c75]
> ./example[0x401436]
> /lib/libc.so.6(__libc_start_main+0xfd)[0x7f3c1655bc4d]
> ./example[0x400d89]
> ======= Memory map: ========
> 00400000-00421000 r-xp 00000000 07:00 828533
> /opt/Csdp-6.1.1/example/example
> 00620000-00621000 r--p 00020000 07:00 828533
> /opt/Csdp-6.1.1/example/example
> 00621000-00622000 rw-p 00021000 07:00 828533
> /opt/Csdp-6.1.1/example/example
> 0143d000-0145e000 rw-p 00000000 00:00 0
>  [heap]
> 7f3c10000000-7f3c10021000 rw-p 00000000 00:00 0
> 7f3c10021000-7f3c14000000 ---p 00000000 00:00 0
> 7f3c16326000-7f3c1633c000 r-xp 00000000 07:00 261712
> /lib/libgcc_s.so.1
> 7f3c1633c000-7f3c1653b000 ---p 00016000 07:00 261712
> /lib/libgcc_s.so.1
> 7f3c1653b000-7f3c1653c000 r--p 00015000 07:00 261712
> /lib/libgcc_s.so.1
> 7f3c1653c000-7f3c1653d000 rw-p 00016000 07:00 261712
> /lib/libgcc_s.so.1
> 7f3c1653d000-7f3c166b7000 r-xp 00000000 07:00 261678
> /lib/libc-2.11.1.so
> 7f3c166b7000-7f3c168b6000 ---p 0017a000 07:00 261678
> /lib/libc-2.11.1.so
> 7f3c168b6000-7f3c168ba000 r--p 00179000 07:00 261678
> /lib/libc-2.11.1.so
> 7f3c168ba000-7f3c168bb000 rw-p 0017d000 07:00 261678
> /lib/libc-2.11.1.so
> 7f3c168bb000-7f3c168c0000 rw-p 00000000 00:00 0
> 7f3c168c0000-7f3c16942000 r-xp 00000000 07:00 261727
> /lib/libm-2.11.1.so
> 7f3c16942000-7f3c16b41000 ---p 00082000 07:00 261727
> /lib/libm-2.11.1.so
> 7f3c16b41000-7f3c16b42000 r--p 00081000 07:00 261727
> /lib/libm-2.11.1.so
> 7f3c16b42000-7f3c16b43000 rw-p 00082000 07:00 261727
> /lib/libm-2.11.1.so
> 7f3c16b43000-7f3c16b79000 r-xp 00000000 07:00 825452
> /usr/local/lib/libgslcblas.so.0.0.0
> 7f3c16b79000-7f3c16d78000 ---p 00036000 07:00 825452
> /usr/local/lib/libgslcblas.so.0.0.0
> 7f3c16d78000-7f3c16d79000 r--p 00035000 07:00 825452
> /usr/local/lib/libgslcblas.so.0.0.0
> 7f3c16d79000-7f3c16d7a000 rw-p 00036000 07:00 825452
> /usr/local/lib/libgslcblas.so.0.0.0
> 7f3c16d7a000-7f3c16d9a000 r-xp 00000000 07:00 261654
> /lib/ld-2.11.1.so
> 7f3c16f79000-7f3c16f7c000 rw-p 00000000 00:00 0
> 7f3c16f97000-7f3c16f9a000 rw-p 00000000 00:00 0
> 7f3c16f9a000-7f3c16f9b000 r--p 00020000 07:00 261654
> /lib/ld-2.11.1.so
> 7f3c16f9b000-7f3c16f9c000 rw-p 00021000 07:00 261654
> /lib/ld-2.11.1.so
> 7f3c16f9c000-7f3c16f9d000 rw-p 00000000 00:00 0
> 7fff2569d000-7fff256b2000 rw-p 00000000 00:00 0
>  [stack]
> 7fff2573c000-7fff2573d000 r-xp 00000000 00:00 0
>  [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
>  [vsyscall]
> Aborted
>
>
> Any clues as to what this all means?
>
> Best,
> Henri Kjellberg
>
> On Wed, Nov 3, 2010 at 7:07 AM, Brian Borchers <borchers at nmt.edu> wrote:
>
>> On Tue, Nov 2, 2010 at 9:08 PM, Henri Kjellberg
>> <henrikjellberg at gmail.com> wrote:
>>
>> > I am trying to figure out if there is some significant change that I
>> > am not seeing or if its purely chaning the names of things. For
>> > example:
>> >
>> > In calc_dobj.c we have
>> >
>> > int k;
>> > double *a;
>> > double *y;
>> > int incx;
>> >
>> > ddot(&k,a+1,&incx,y+1,&incx);
>> >
>> > Is it as straight forward as to change it to
>> > cblas_ddot(&k,a+1,&incx,y+1,&incx);
>> >
>>
>> I believe that it's just that simple.  The CBLAS was defined by a
>> group called the BLAS technical forum.  There is online documentation
>> of the CBLAS interface that would explain any differences.
>>
>>
>>
>> --
>> Brian Borchers                          borchers at nmt.edu
>> Department of Mathematics      http://www.nmt.edu/~borchers/
>> New Mexico Tech                       Phone: (575) 322-2592
>> Socorro, NM 87801                   FAX: (575) 835-5366
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/csdp/attachments/20101107/83284370/attachment-0001.html 


More information about the Csdp mailing list