<html><body><div dir="ltr"><div>
  
  
  
    
    </div><div><div dir="ltr">Dear Peter,</div><div dir="ltr"><br></div><div dir="ltr">Thanks a lot for the reply and the kind advice.</div><div dir="ltr"><br></div><div dir="ltr">Yes, indeed that’s a very good point. We have tried to scale both rows (scale given row of A and B simultaneously) and columns (coefficients in one column of A are scaled up, while the corresponding variables are scaled down) and the manual scaling in addition to Gurobi’s internal automatic scaling surely helps alleviate the problem and makes some models solveable or more stable.</div><div dir="ltr"><br></div><div dir="ltr">However,<span style="font-size: inherit;"> unfortunately we found that it doesn’t fundamentally solve the problem, since (1) scaling entire rows of A doesn’t change the “dynamic range” between large and very small coefficients, which are simultaneously scaled, and (2) scaling column coefficients and downscaling variables help to some extent, but eventually the variables themselves get too small for the numerical precision (say 1e-14 or lower). Therefore, even with scaling, solutions by Gurobi are still rather unstable in general (and the optimal scaling factors are largely hit-and-miss and depends on each specific problem, so one also has to do lots of trial-and-error each time), which is why we’re hoping to see if a quad precision or multiprecision solver, albeit probably much slower, might be able to help solve some of those problems more stably and accurately.</span></div><div dir="ltr"><span style="font-size: inherit;"><br></span></div><div dir="ltr"><span style="font-size: inherit;">Many thanks again for the quick follow-up.</span></div><div dir="ltr"><span style="font-size: inherit;"><br></span></div><div dir="ltr">Regards,</div><div dir="ltr">Mike</div><div dir="ltr"><br></div><div dir="ltr"><br></div>
    <div id="ms-outlook-mobile-signature" dir="ltr"><div dir="ltr"></div></div>
  

<div> </div><hr style="display:inline-block;width:98%" tabindex="-1"><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif"><b>发件人:</b> Peter Notebaert <mail@peno.be><br><b>发送时间:</b> 星期五, 九月 27, 2024 10:50 下午<br><b>收件人:</b> wenyuan.wang@naist.ac.jp <wenyuan.wang@naist.ac.jp><br><b>抄送:</b> soplex@zib.de <soplex@zib.de><br><b>主题:</b> Re: [Soplex] Inquiry about using quad precision with SOPLEX<div> </div></font></div><div dir="ltr">Hi,<div dir="ltr"><br></div><div>As being both a Gurobi and scip user, my first question to you would be if you have tried to scale your matrix yourself.</div><div>Gurobi has internal scaling strategies but you know your model best and you may be able to scale the input data alot better than a solver does.<br></div><div dir="ltr"><br></div><div>Peter</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 27 Sept 2024 at 11:41, Wang Wenyuan <<a href="mailto:wenyuan.wang@naist.ac.jp">wenyuan.wang@naist.ac.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">Dear Soplex developers,<br>
<br>
This is Wenyuan (Mike) Wang, currently working as an Associate Professor <br>
in Information Science at Nara Institute of Science and Technology in <br>
Japan. I work on quantum information (especially quantum cryptography) <br>
and in our field we often run into linear programming or <br>
semidefinite-programming problems that require numerical solvers.<br>
<br>
Previously we mainly used Gurobi for LP problems and Mosek for SDP (and <br>
some LP), which are rather fast and work reasonably accurately. However, <br>
recently we are visiting some more numerically challenging LP problems. <br>
Particularly, say in the form of Ax<=B, A can have a size as large as <br>
2000x2000, and the largest vs smallest coefficients in A can have as <br>
many as 15 orders-of-magnitude differences. This makes Gurobi struggle a <br>
lot with reaching an accurate solution. Therefore, we are hoping to find <br>
some solvers with even higher precision (such as quad-precision, <br>
arbitrary-precision, or even rational exact solvers) to see if they <br>
might help with our problem.<br>
<br>
I have followed the README and INSTALL instructions in the soplex <br>
package (version 711) and have successfully compiled it in Linux <br>
environment (AMD x86_64 CPU with Windows WSL Ubuntu) and macos <br>
environment (M2 Max with Rosetta emulated x86). I compiled with makefile <br>
flags such as GMP=true, QUADMATH=true/false, MPFR=true (quadmath option <br>
is not available for Apple Silicon, while gmp and mpfr works on both <br>
platforms). With dependencies including gmp, boost::quadmath, zlib set <br>
up, I was also able to link Soplex to my C++ project (CLion) and run the <br>
simple real number and rational number test programs in <br>
<a href="https://soplex.zib.de/doc/html/example_8cpp_source.php" rel="noreferrer">https://soplex.zib.de/doc/html/example_8cpp_source.php</a>.<br>
<br>
However, my question is, when using the library, how should I turn on <br>
the 80-bit (or float_128 in quadmath?) quad precision as described in <br>
the Soplex main page? I looked through the parameter list, but it seems <br>
there is no option for switching the internal precision, and while in <br>
the changelog <a href="https://soplex.zib.de/doc-7.1.1/html/CHANGELOG.php" rel="noreferrer">https://soplex.zib.de/doc-7.1.1/html/CHANGELOG.php</a> it <br>
mentions that there're two run-time command line options "solvemode" and <br>
"arithmetic", unfortunately they seem to only work in standalone mode <br>
but do not seem to be available for the library with the setIntParam <br>
API.<br>
<br>
The only parameters I can find that relate to precision seem to be <br>
ADAPT_TOLS_TO_MULTIPRECISION, PRECISION_BOOSTING, MULTIPRECISION_LIMIT, <br>
and PRECISION_BOOSTING_FACTOR. However, they seem to be related to MPFR <br>
(since when I set e.g. PRECISION_BOOSTING to true, the program will <br>
automatically output a warning if mpfr is not installed) but not <br>
boost::quadmath.<br>
<br>
May I ask if there is any specific argument to enable quadmath (or does <br>
linking to the Soplex library compiled with quadmath=true automatically <br>
enable it)? Or, is the quad-precision option already deprecated? Also, <br>
if one instead hopes to use the arbitrary-precision MPFR instead, may I <br>
ask what might be the recommended settings for the above four <br>
precision-related parameters, and is setting up those parameters at the <br>
beginning of the program all one needs to do (without any API function <br>
call change)?<br>
<br>
Looking forward to your kind suggestions. Many thanks for your kind help <br>
in advance.<br>
<br>
Regards,<br>
Mike<br>
_______________________________________________<br>
SoPlex mailing list<br>
<a href="mailto:SoPlex@zib.de">SoPlex@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/soplex" rel="noreferrer">https://listserv.zib.de/mailman/listinfo/soplex</a><br>
</blockquote></div>
</div><div id="ms-outlook-mobile-signature" dir="ltr"><div></div></div></div></body></html>