Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Yesterday I upgraded from mathematica 8.0.4.0 to 9.0.1.0.

Trying to run the same notebook I used many times before, it takes ages to evaluate a symbolic (linearsolve) expression which before was evaluated in within a minute. It doesn't give the answer within 12 hours, with CPU usage at 25-30%.

What could have changed? (I don't want to switch back to the old version, want to fix this).

I want to solve:

rhoout = LinearSolve[Mcoeff, out]

Where the (10-by-1) vector is simply:

out = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}

And the matrix (10-by-9):

Mcoeff = {{1, 0, 0, 0, 1, 0, 0, 0, 1}, {-c21 - c31, 0, -I omge, 0, c12, 0, 
  I Conjugate[omge], 0, c13}, {0, 
  I (-dge + dse) - c1/4 - c12/2 - c2/4 - c21/2 - c31/2 - c32/
   2, -I omse, 0, 0, 0, 0, I Conjugate[omge], 
  0}, {-I Conjugate[omge], -I Conjugate[omse], -I dge - c1/4 - c13/2 -
    c21/2 - c23/2 - c3/4 - c31/2, 0, 0, 0, 0, 0, 
  I Conjugate[omge]}, {0, 0, 
  0, -I (-dge + dse) - c1/4 - c12/2 - c2/4 - c21/2 - c31/2 - c32/2, 
  0, -I omge, I Conjugate[omse], 0, 0}, {c21, 0, 0, 
  0, -c12 - c32, -I omse, 0, I Conjugate[omse], c23}, {0, 0, 
  0, -I Conjugate[omge], -I Conjugate[omse], -I dge - I (-dge + dse) -
    c12/2 - c13/2 - c2/4 - c23/2 - c3/4 - c32/2, 0, 0, 
  I Conjugate[omse]}, {I omge, 0, 0, I omse, 0, 0, 
  I dge - c1/4 - c13/2 - c21/2 - c23/2 - c3/4 - c31/2, 
  0, -I omge}, {0, I omge, 0, 0, I omse, 0, 0, 
  I dge + I (-dge + dse) - c12/2 - c13/2 - c2/4 - c23/2 - c3/4 - c32/
   2, -I omse}, {c31, 0, I omge, 0, c32, 
  I omse, -I Conjugate[omge], -I Conjugate[omse], -c13 - c23}}

EDIT

OK, I did install the older version again (Mathematica 8.0.4.0), this is the result (I suppressed the output because it is very large, hence the 'Null' in the answer):

In[51]:= Timing[rhoout = LinearSolve[Mcoeff, out];]

Out[51]= {6.256, Null}

In v9.0.1.0, the exact same command (the same .nb file) does not produce an answer within reasonable time (again, I have let the evaluation run overnight, >12hrs, and there was no result)

share|improve this question
    
Welcome to MMA SE. Please take the time to read the FAQ under the help (upper-right of site layout), and in particular how to format code in questions - it will aid readers, and make it more likely to get attention. –  rasher Feb 20 at 11:25
    
I can reproduce your findings. In v8 it finishes relatively quickly and the result appears to be correct based on numerical testing. In v9 it doesn't finish. I would contact support at wolfram.com about this. It's good to note though that the result returned by v8 is so huge that I can't really use it for any symbolic calculations, I couldn't even verify that it's correct symbolically (only numerically). –  Szabolcs Feb 20 at 14:40
    
Thanks for checking, also meanwhile in another post someone proposed a better solution to handle this particular problem. The problem as I wrote it above is not very well posed. Still that does not explain the difference in how LinearSolve handles it in the two versions. I did send this question to Wolfram also. –  Sander Feb 20 at 15:51
1  
Looks like some heuristic cutoffs for using Together and the like were modified in a way that has an adverse effect on speed for this example. Will investigate. –  Daniel Lichtblau Feb 20 at 18:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.