<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi:<br>
<br>
I spent a lot of time trying to get this to work with the xfunction
toolkit from <a class="moz-txt-link-freetext" href="http://www.excelsior-usa.com/xfunction.html">http://www.excelsior-usa.com/xfunction.html</a> using the
CoinMP.dll<br>
<br>
xfunction worked fine, but in the end I gave up as the problems became
too large and started blowing the memory size in the JVM. In addition
it appeared to be leaking memory, I fixed some of the obvious memory
leaks in CoinMP but there appeared to be still some problems which I
think are in xFunction.<br>
<br>
I now just autogenerate the MPS file from java, start the cbcSolve
executable and then read up the output file. It looks clunky but it
works and no memory issues.<br>
<br>
If your problems are small and you are not calling it repetitively I
would suggest using xFunction with CoinMP.dll or equivalent linux
library.<br>
<br>
Rod<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:acw@ascent.com">acw@ascent.com</a> wrote:
<blockquote
 cite="mid:OF2E67FDE8.586AA6B6-ON85257611.0072B0A3-85257611.007408C4@ascent.com"
 type="cite"><br>
  <font face="sans-serif" size="2">We have a Cbc application that is
invoked
from Java using the Java Native Interface (JNI).</font>
  <br>
  <br>
  <font face="sans-serif" size="2">We're working under Linux.</font>
  <br>
  <br>
  <font face="sans-serif" size="2">We build a shared-object (.so)
library
which provides an entry-point very much like driver4's "main".
&nbsp;This entry works fine when called straight from C++ code. &nbsp;But
when called via JNI it fails in a weird way. &nbsp;It throws a segmentation
fault immediately after entering the function CbcMain1. &nbsp;I moved
debugging
statements around the entry to CbcMain1, and I can't resolve the place
the fault is signalled: it looks like it happens as part of the calling
sequence to CbcMain1.</font>
  <br>
  <br>
  <font face="sans-serif" size="2">A call to CbcMain0, a few lines
upstream,
completes successfully.</font>
  <br>
  <br>
  <font face="sans-serif" size="2">Has anyone else succeeded in using
Cbc
from Java/JNI, and do you have any advice to offer? &nbsp;I am suspecting
that some of the compilation flags in the Cbc build process violate
JNI's
expectations about library structure, but this vague suspicion doesn't
explain why CbcMain0 works and CbcMain1 fails.</font>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
  </pre>
</blockquote>
</body>
</html>