Hi Ted:<br><br>Thank you very much for your quick response.<br>BTW, I just find out another problem<br>When I have match linked to libSym, I got a result as described in the manual<br>However, when I have match linked to libSymAppl, the system crashes, (Segmentation fault) <br>
So, I go on to debug the source code. <br>What I found out is there is a structure cut _data <br>which is sort of polymorphism data <br>where <br>char * coef; can be casted to any kind of data <br>and the interpretation (performed by void unpack_cuts_u in lp_wrapper.c) will depend on the field type)<br>
What I saw is that:<br>lines 1925-1927 <br>     nzcnt = ((int *) (cuts[i]-&gt;coef))[0];<br>     matval = (double *) (cuts[i]-&gt;coef + DSIZE);<br>     matind = (int *) (cuts[i]-&gt;coef + (nzcnt + 1)*DSIZE);<br>So, I supposed with cut type is EXPLICIT_ROW then the data pointed out by coef should be <br>
(ISIZE buyes = 4 in my computer) int number_of_non_zero; <br>(4 bytes = unused - this ise the difference between DSIZE = 8 and ISIZE=4) <br>... unused (or something else) =&gt; the difference between DSIZE (= 8 bytes in ) <br>
(DSIZE*number of non zero) double non_zero_values<br>(ISIZE*number of non zero) double non_zero_indexes<br><br>However, when I examine the memory at address cuts[i]-&gt;coef, I saw <br>(4 bytes) integer number of non zero <br>
(3*4 bytes) integer non zero indexes <br>(3*8 bytes) double non_zero_values <br><br>$ gdb --args ./match -F sample.mat <br>...<br>(gdb) l lp_wrapper.c:1925<br>1920          case EXPLICIT_ROW:<br>1921         real_nzcnt = 0;<br>
1922         row_list[explicit_row_num] =<br>1923            (waiting_row *) malloc(sizeof(waiting_row));<br>1924         row_list[explicit_row_num]-&gt;cut = cuts[i];<br>1925         nzcnt = ((int *) (cuts[i]-&gt;coef))[0];<br>
1926         matval = (double *) (cuts[i]-&gt;coef + DSIZE);<br>1927         matind = (int *) (cuts[i]-&gt;coef + (nzcnt + 1)*DSIZE);<br>1928         row_matval = row_list[explicit_row_num]-&gt;matval = <br>1929                (double *) malloc(nzcnt * DSIZE);<br>
(gdb) b lp_wrapper.c:1925<br>Breakpoint 1 at 0x8093e96: file LP/lp_wrapper.c, line 1925.<br>gdb) run<br>Starting program: /home/an/SYMPHONY-5.3.3/SYMPHONY/Applications/MATCH/match -F sample.mat<br><br>==  Welcome to the SYMPHONY MILP Solver <br>
==  Copyright 2000-2010 Ted Ralphs and others <br>==  All Rights Reserved. <br>==  Distributed under the Common Public License 1.0 <br>==  Version: 5.3.3 <br>==  Build Date: May 29 2011 <br><br>Solving...<br><br>solving root lp relaxation<br>
The LP value is: 3.000 [0,6]<br><br><br>Breakpoint 1, unpack_cuts_u (p=0x83bd898, from=0, type=0, cut_num=2, <br>    cuts=0x83db350, new_row_num=0xbfffef50, new_rows=0xbfffef34)<br>    at LP/lp_wrapper.c:1925<br>1925         nzcnt = ((int *) (cuts[i]-&gt;coef))[0];<br>
<br>(gdb) x/40xb cuts[i]-&gt;coef<br>0x83c2988:    0x03    0x00    0x00    0x00    0x00    0x00    0x00    0x00<br>0x83c2990:    0x05    0x00    0x00    0x00    0x01    0x00    0x00    0x00<br>0x83c2998:    0x00    0x00    0x00    0x00    0x00    0x00    0xf0    0x3f<br>
0x83c29a0:    0x00    0x00    0x00    0x00    0x00    0x00    0xf0    0x3f<br>0x83c29a8:    0x00    0x00    0x00    0x00    0x00    0x00    0xf0    0x3f<br><br><br>Obviously, the program crashes just after it picks up these data <br>
<br>I couln&#39;t find any document describing each type of cut_data, so I could n&#39;t really fix it. <br>However, in the file cg_func.c, I saw the two functions<br>create_explicit_cut &amp; cg_add_explicit_cut <br>with the following code<br>
<br>   ((int *) cut-&gt;coef)[0] = nzcnt;<br>   memcpy(cut-&gt;coef + ISIZE, (char *)indices, nzcnt*ISIZE);<br>   memcpy(cut-&gt;coef + (nzcnt + 1) * ISIZE, (char *)values, nzcnt * DSIZE);<br><br>Therefore, I assume that these lines should be changed to <br>
in function unpack_cuts_u<br>     nzcnt = ((int *) (cuts[i]-&gt;coef))[0];<br>     //matval = (double *) (cuts[i]-&gt;coef + DSIZE);<br>     //matind = (int *) (cuts[i]-&gt;coef + (nzcnt + 1)*DSIZE);<br>    // try to see what happens here <br>
    // this is OK with create_explicit_cut &amp; cg_add_explicit_cut <br>    matind = (int *) (cuts[i]-&gt;coef + ISIZE);<br>    matval = (double *) (cuts[i]-&gt;coef + (nzcnt+1)*ISIZE);<br>    // end  <br><br><br>and try again, but the program crashes again, at another places (still something to do with cuts) <br>
<br>As I really in need of this software, if you don&#39;t mind to share a little bit of the design, I would like to contribute to fix some of the bugs<br><br>Thanks<br>An <br><br><br><br><br><br><br><br> <br><br><div class="gmail_quote">
On Sun, May 29, 2011 at 10:55 AM, Ted Ralphs <span dir="ltr">&lt;<a href="mailto:ted@lehigh.edu">ted@lehigh.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks for the report and my apologies for the trouble. I had actually<br>
already discovered this issue and fixed it in trunk. I&#39;ll port it the<br>
fix to stable create a new release as soon as I can.<br>
<br>
Cheers,<br>
<br>
Ted<br>
<div><div></div><div class="h5"><br>
On Sat, May 28, 2011 at 7:52 PM, an ngo &lt;<a href="mailto:ngothean1@gmail.com">ngothean1@gmail.com</a>&gt; wrote:<br>
&gt; Hi all:<br>
&gt; Sorry, I don&#39;t know how to continue the same thread, so I send another email<br>
&gt; to clarify the question I sent yesterday.<br>
&gt; My problem is that while configure my installation by<br>
&gt; ./configure --with-application<br>
&gt; when I make  the application MATCH the results look like USE_SYM_APPLICATION<br>
&gt; is not defined as no call backs functions are called.<br>
&gt; However, I did verify that the flag was set properly. Finally, this error is<br>
&gt; caused by:<br>
&gt; In the file<br>
&gt; SYMPHONY-5.3.3/SYMPHONY/Applications/Makefile.Applications<br>
&gt; as  COIN_HAS_PKGCONFIG = true<br>
&gt; match will be linked the library determined by<br>
&gt; LIBS += `PKG_CONFIG_PATH=/home/thuy/SYMPHONY-5.3.3/lib/pkgconfig:<br>
&gt; /usr/bin/pkg-config --libs symphony`<br>
&gt; However, the package config file symphony.pc will lead to libSym instead of<br>
&gt; libSymAppl<br>
&gt;<br>
&gt; As a quick fix, I duplicate the file symphony.pc to symphonyappl.pc and<br>
&gt; change libSym to libSymAppl in the new config.<br>
&gt; Then in Makefile.Applications, the config file will be symphonyappl instead<br>
&gt; of symphony<br>
&gt;<br>
&gt; The issue with USE_GLPMPL is not fixed yet.<br>
&gt; Thanks<br>
&gt; A.<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Symphony mailing list<br>
&gt; <a href="mailto:Symphony@list.coin-or.org">Symphony@list.coin-or.org</a><br>
&gt; <a href="http://list.coin-or.org/mailman/listinfo/symphony" target="_blank">http://list.coin-or.org/mailman/listinfo/symphony</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Dr. Ted Ralphs<br>
Associate Professor, Lehigh University<br>
<a href="tel:%28610%29%20628-1280" value="+16106281280">(610) 628-1280</a><br>
ted &#39;at&#39; lehigh &#39;dot&#39; edu<br>
<a href="http://coral.ie.lehigh.edu/%7Eted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
</font></blockquote></div><br>