Registered Member
|
hi,
i wanted to use eigen's BiCGSTAB solver, but i've some problems with it i've this switch
but bicg fails at solving the system (while, on the same input, umfpack solves it).. is there any reason i don't know for which bicg can fail, when lu succeds? or maybe i'm doing it wrong? |
Moderator
|
In some cases, the bi-conjugate gradient stabilized algorithm can stagnate. This can sometime be overcame with good preconditioners and/or hybrid approaches.
|
Registered Member
|
well, my error was that "RowMajor" you see which wasn't supposed to be there
but i've another problem now running my program on windows, bicgstab is slightly slower than umfpack solving, and that is fine, but when i run the same program on linux the time spread between umfpack and bicgstab solving is much wider for instance, a solving can take 3 secs on windows (compiling with visual c++) with umfpack, and 7 with bicgstab, while it takes 4 secs on linux (compiling with gcc/g++) with umfpack and 31 with bicgstab.. any ideas to explain this behaviour? |
Moderator
|
|
Registered Member
|
oh, thank you, now it runs much faster, significantly faster than the windows version, compiled with vc.. maybe there's a reference out there about the flags i should use to optimize eigen's code for vc? (i've tried /O2 and /Ot but i can't see any difference) |
Moderator
|
How much faster? In general VC is known to produce slightly slower code than recent GCC versions, especially with complex template code as Eigen.
|
Registered Member
|
You might have to add /arch:SSE2 if you're compiling for 32bit.
'And all those exclamation marks, you notice? Five? A sure sign of someone who wears his underpants on his head.' ~Terry Pratchett
'It's funny. All you have to do is say something nobody understands and they'll do practically anything you want them to.' ~J.D. Salinger |
Registered Member
|
oh, well.. probably it's just because i compile with a 64 bit gcc version and a 32 bit vc version
maybe i should give some details: i'm writing a solver for a problem that needs 3 linear systems to be computed, one is ~2n x ~2n, the others are ~n x ~n compiling with gcc on ubuntu x64, when n = ~107k it takes ~81 seconds to run compiling with vc (32 bit compiler) and running on windows 7 x64, when n = ~107k, it takes ~103 seconds to run it seems to me a big difference.. i don't know how eigen works exactly, can this difference be explained by the 32/64 bit compiling? ps: the /arch:SSE2 slightly worsens the performances (really slightly, it goes from 103 to 107 seconds to run on the same input) |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]