lanl/qmasm

empty output, no errors

derlin opened this issue · 7 comments

When I try to submit a very big qmasm file (here 17'350 variables and 87'689 couplers) in qbsolv format, I expect QMASM either to produce a solution or to fail with an error (for example a timeout or a memory error). None of that happens, instead I get an empty output after about 4s:

time qmasm --format=qbsolv -q --run big_file.qmasm

real	0m32.333s
user	0m23.580s
sys	0m4.260s

I also tried passing a timeout parameter to qbsolv (--extra-args "-t 10") or specifying I want all the solutions (--show all), but the result is the same.

Is this the intended behavior ? How should I interpret an empty output ?

I would have expected such a large problem simply to take a long time, not to terminate after only a few seconds.

Do you get any useful information by adding -v -v --extra-args="-v3" to the qmasm command line?

Thank you for the quick reply !

here is the output using the aforementioned options:

time qmasm --format=qbsolv -q -v -v --extra-args="-v3" --run lala.qmasm | tee qmasm.log
Command line provided:

    /usr/local/bin/qmasm --format=qbsolv -q -v -v --extra-args=-v3 --run lala.qmasm

All QMASM parameters:

    Option          Value(s)      
    --------------  --------------
    --O             0             
    --always-embed  False         
    --anneal-time   None          
    --chain-strength  None          
    --extra-args    '-v3'         
    --format        'qbsolv'      
    --input         ['lala.qmasm']
    --output        '<stdout>'    
    --pin           None          
    --pin-weight    None          
    --postproc      'none'        
    --qubo          True          
    --run           True          
    --samples       1000          
    --show          'valid'       
    --spin-revs     0             
    --topology-file  None          
    --values        'bools'       
    --verbose       2             

Computed the following strengths:

    chain: -143.5193
    pin:   -143.5193

Encountered the following solver properties:

    Parameter    Value
    -----------  -----
    solver_name  'phony'

Submitting the problem to qbsolv via qmasm-qbsolv.

    Command line: qmasm-qbsolv -i /tmp/qmasm-x1ZtFZ.qubo -v3 --verbosity=2 --values=bools --pin-weight=-143.519332 --chain-strength=-143.519332


real	0m32.416s
user	0m23.450s
sys	0m4.550s

Hmm…not much information. Let's try running qmasm-qbsolv manually. Add -o lala.qubo to the qmasm command line then run qmasm-qbsolv as in your output above:

qmasm-qbsolv -i lala.qubo -v3 --verbosity=2 --values=bools --pin-weight=-143.519332 --chain-strength=-143.519332

If that still doesn't output anything, try running qbsolv directly:

qbsolv -i lala.qubo -v3

I hope one of those commands will give us a clue as to what's going wrong.

Running qbsolv directly seems to work (it is still executing ^^). This is strange. Any idea on what causes the problem ?

Well, this seems to point to qmasm-qbsolv as the culprit. It's still outputting nothing before exiting, right?

After about 18 minutes, it actually produced a result. I haven't validated it yet, but it seems correct ! So the problem seems to lie in between qmasm and qmasm-qbsolv.

Closing this issue because the latest version of QMASM integrates the dwave_qbsolv package in place of calling out to a separate qmasm-qbsolv program. Please feel free to re-open the issue if you're still seeing empty output files or other bad behavior from QMASM.