Floating point exception: 8 when solving a particular problem

#7 · closed · 1 comments

View on GitHub ↗

thisiscam

Hi, Running the code below gets me a `Floating point exception: 8` ```python import qsoptex import logging logging.basicConfig(level=logging.DEBUG) p = qsoptex.ExactProblem() p.read(b'test.lp', filetype=b'lp') # 'LP' is also supported p.set_param(qsoptex.Parameter.SIMPLEX_DISPLAY, 1) status = p.solve() print(status) ``` The LP problem `test.lp` is [here](https://github.com/jonls/python-qsoptex/files/5823999/test.lp.txt) (You might need to rename it to drop the .txt extension) What's wierd is that the command `esolver -L -O test.sol test.lp` works fine. It seems to be an issue with reading solutions in the python binding?

Comments

thisiscam

I found the problem. The `qsopt-ex` library I compiled was linked to a different libc than the one used by Cython. This was because I'm using conda, and `qsopt-ex`'s `./configure` resorted to my system wide libc... The compile command I finally used for `qsopt-ex` is: ```bash CFLAGS="-I$CONDA_PREFIX/include" LDFLAGS="-L$CONDA_PREFIX/lib" ../configure --prefix $CONDA_PREFIX ``` For this python library, I used ```bash MP_INCLUDE_DIR="$CONDA_PREFIX/include" GMP_LIBRARY_DIR="$CONDA_PREFIX/lib" ./setup.py install ```