This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Build Eigen benchmarks (spbenchsolver) with Visual Studio 10

Tags: spbenchsolver, benchmark, visual studio, windows, eigen spbenchsolver, benchmark, visual studio, windows, eigen spbenchsolver, benchmark, visual studio, windows, eigen
(comma "," separated)
epsi1on
Registered Member
Posts
3
Karma
0
Hi.
Can you guys give me information about how can i build the spbenchsolver in visual studio 2010 to be able to see benchmarks of solvers available in Eigen?
Please refer to bottom section of this page for more information about benchmarks and spbenchsolver (the 'BenchmarkRoutine' section) :
http://eigen.tuxfamily.org/dox/group__T ... stems.html
I'm not familiar with environments other than Visual Studio. ;D

Regards
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
You need to use cmake to generate the MSVC solutions, (within cmake you might have to explicitly enable the build of spbenchsolver). For external solvers, you need to have them properly installed and configured through cmake.
epsi1on
Registered Member
Posts
3
Karma
0
Thanks for information.
i've tried to use CMake to build it, here is the result:
Image
Can you please give me more information about what part is wrong (seems it encounters error)?

Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
nothing is wrong, it's just telling that some optional dependencies have not been found.
tienhung
Registered Member
Posts
29
Karma
0
Oh, exactly what I am looking for. I wasted so much time to compare solvers in Eigen. Could you please show some small examples of using benchmarks? Thanks.

EDIT: for compiling spbenchsolver in MSVS, you need to add dirent.h to include directory. Get dirent.h here:
http://www.softagalleria.net/dirent.php

Maybe you need to comment lines #49 and #52 in unsupported\Eigen\SparseExtra
Code: Select all
//#if !defined(_WIN32)
#include <dirent.h>
#include "src/SparseExtra/MatrixMarketIterator.h"
//#endif


But I still don't know how to run it correctly (maybe I will give a look at the code later when I have time). For example, if I want to know which solver is the best for linear equation: A*x = b (A and b are given in .mtx format).
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
epsi1on
Registered Member
Posts
3
Karma
0
Hello again :)
Unfortunately i was not able to build the benchmark (even regarding guidlines from moderator), can anyone upload pre builded executable of the spbenchsolver for 64bit Windows? And how much it's result will be different than one builded on my machine (if differs at all)?

Thanks heaps!
tienhung
Registered Member
Posts
29
Karma
0
epsi1on wrote:Hello again :)
Unfortunately i was not able to build the benchmark (even regarding guidlines from moderator), can anyone upload pre builded executable of the spbenchsolver for 64bit Windows? And how much it's result will be different than one builded on my machine (if differs at all)?

Thanks heaps!


It depends on what 3rd libraries do you have, so I don't think my spbenchsolver.exe will work well with your computer.
To build spbenchsolver, you should have a look at the files spbenchsolver.h and spbenchsolver.cpp. Here you can modify the code as you want (for example, I don't have PASTIX, so I comment out the part with PASTIX solver).
Are there bugs with spbenchsolver (I am not sure, maybe I built it wrongly) ???
- I save my symmetric matrix as ..._SPD.mtx by using saveMarket(matrix, filename, 1), but spbenchsolver can't detect its symmetry, so all solvers for SPD matrices don't run.
- For linear equation A*x = b, where A is symmetric and sparse with size (n,n), size of b is (n,1), spbenchsolver works with A, but it crashes if I save matrix b together. I should define matrix b as the right side matrix, right?
tienhung
Registered Member
Posts
29
Karma
0
This is what I did: I created a simple solver for each QR, LU, LLT, .... My solver takes 2 inputs as matrix A and matrix b, and it exports the results (time, relative error, ...) in to a .csv file. And make a batch file to run all these solvers automatically.
You can try with .xml file.
micagordon
Registered Member
Posts
6
Karma
0
tienhung wrote:This is what I did: I created a simple solver for each QR, LU, LLT, .... My solver takes 2 inputs as matrix A and matrix b, and it exports the results (time, relative error, ...) in to a .csv file. And make a batch file to run all these solvers automatically.
You can try with .xml file.

Thanks, tienhung. Really appreciate you.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]