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

Using the unsupported module: cannot find slu_Cnames.h

Tags: None
(comma "," separated)
jbcolmena
Registered Member
Posts
4
Karma
0
Hi,

I was able to install the library and make a few test using dense matrices. Then I moved forward to what I need, and that is sparse matrices. When I try to compile I get this error message:

Code: Select all
/usr/local/include/eigen3/Eigen/SuperLUSupport:13:24: fatal error: slu_Cnames.h: No such file or directory


I cannot find slu_Cnames.h. I cannot even find to what package it belongs to. Google has been of no help. I'm going crazy about this. I'm sure it's some stupid silly mistake somewhere, but well, I just cant find the error. I'm using: ubuntu 12.04, cmake 2.8.5, g++ 4.6.1.

The tests that come with Eigen compiled 100%. So the problem it's me. Not the machine or the file... The tests are still running, so far 237/237 have passed.


This is my cmake config file:
Code: Select all
set(CMAKE_CXX_COMPILER g++)

include_directories(${PBSOLVER_SOURCE_DIR}/include /usr/local/include/eigen3/
          /usr/local/include/eigen3/unsupported/)
      
set(pbsolverSources main.cpp pbsolver.cpp zero_fdsolver.cpp
          coulombic_fdsolver.cpp coulombic_fdsolver_salt.cpp
          green_fdsolver.cpp green_salt_fdsolver.cpp
          green_dipole_fdsolver.cpp green_dipole_salt_fdsolver.cpp
          fdsolver.cpp parametersParser.cpp logfile.cpp memory.cpp)

set(CMAKE_CXX_FLAGS "-g -O3 -Wall -DDOUBLE -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET")
add_executable (pbsolver ${pbsolverSources})
target_link_libraries(pbsolver m rt blas superlu)#


I was using gsl. Then I had no enough memory to do what I need -calculate the eigenvalues of a very large matrix-. Then I tried slepc, which I couldn't install -they don't even have a forum or a mailing list-. Now I've trying to use Eigen for hours... Help! Thanks in advance.

UPDATE: Not all passed, this is the ouput:

99% tests passed, 5 tests failed out of 593

Total Test time (real) = 1435.76 sec

The following tests FAILED:
530 - sblat2 (Failed)
531 - sblat3 (Failed)
536 - cblat2 (Failed)
537 - cblat3 (Failed)
593 - gmres_2 (Failed)
Errors while running CTest
make[3]: *** [CMakeFiles/check] Error 8
make[2]: *** [CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Hi,

the SuperLUSupport module requires SuperLU to be installed and available in the path... You will also need to link against SuperLU and its dependency (blas, e.g., eigen_blas that you can find in build/blas/)
jbcolmena
Registered Member
Posts
4
Karma
0
Thanks.

I just build superLU from the source (version 4.3). And now I'm getting all kinds of errors from SuperLUSupport.h:

>> make
[ 7%] Building CXX object bin/CMakeFiles/pbsolver.dir/main.cpp.o
In file included from /usr/local/include/eigen3/unsupported/Eigen/SuperLUSupport:29:0,
from /home/jcolmenares/workspace/repository/pbsolver-repository/branches/eigenvalues/pbsolver/src/include/fdsolver.h:24,
from /home/jcolmenares/workspace/repository/pbsolver-repository/branches/eigenvalues/pbsolver/src/include/coulombic_fdsolver.h:4,
from /home/jcolmenares/workspace/repository/pbsolver-repository/branches/eigenvalues/pbsolver/src/include/pbsolver.h:21,
from /home/jcolmenares/workspace/repository/pbsolver-repository/branches/eigenvalues/pbsolver/src/main.cpp:1:
/usr/local/include/eigen3/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h:299:7: error: ‘SparseLU’ is not a template
/usr/local/include/eigen3/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h:315:26: error: ‘NaturalOrdering’ was not declared in this scope


and after a whole lot of "was not declared in this scope" follows. This is modified cmake file:

Code: Select all
include_directories (.)

project(PBSOLVER)

set(CMAKE_CXX_COMPILER g++)

include_directories(${PBSOLVER_SOURCE_DIR}/include
          /usr/local/include/eigen3/unsupported/
          /usr/local/include/eigen3/Eigen/
          /home/jcolmenares/programs/SuperLU_4.3/CBLAS/
          /home/jcolmenares/programs/SuperLU_4.3/SRC/)

set(pbsolverSources main.cpp pbsolver.cpp zero_fdsolver.cpp
          coulombic_fdsolver.cpp coulombic_fdsolver_salt.cpp
          green_fdsolver.cpp green_salt_fdsolver.cpp
          green_dipole_fdsolver.cpp green_dipole_salt_fdsolver.cpp
          fdsolver.cpp parametersParser.cpp logfile.cpp memory.cpp)

set(CMAKE_CXX_FLAGS "-g -O3 -Wall -DDOUBLE -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET")
add_executable (pbsolver ${pbsolverSources})
target_link_libraries(pbsolver m rt blas superlu)


I have no idea about what might be wrong...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
it seems you are using a pretty old version, please update to the devel branch (will become 3.1-RC1 today), and check the sparse tutorial: http://eigen.tuxfamily.org/dox-devel/Tu ... parse.html
jbcolmena
Registered Member
Posts
4
Karma
0
I'm using Eigen 3.1.0-beta1, SuperLU (4.3), g++ 4.6.1, on xubuntu 12.04. Nothing old here.

I'll reinstall, and use the BICGSTAB instead. It should work. My matrix is very sparse, and nearly simetrical.

Will let you know if I was able to run it.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
hm, there is no such file in Eigen 3.1:

eigen3/unsupported/Eigen/SuperLUSupport

You should include Eigen/SuperLUSupport (the one in eigen3/, not in unsupported). To solve:

x = SuperLU<SpType>(A).solve(b);
jbcolmena
Registered Member
Posts
4
Karma
0
Hi,

I found something extrange. I was following the instructions at: http://eigen.tuxfamily.org/dox/TutorialSparse.html where there is no mention that superLU should be installed. I followed your link, and indeed the tutorial is much better. You have two versions of the tutorial and it's not clear when someone should follow one or the other. I got to the one I posted following home -> documentation -> long tutorial -> sparse matrices.

I installed everything again making a mercurial clone. I was trying to use BICGSTAB, which according to the link you sent me has no dependencies since it's built in. But when I try to compile I get asked for BiCGSTAB.h. Googling BiCGSTAB.h, it's part of http://math.nist.gov/iml++/. I don't know if I'm missing something. Do I need to install iml++? or am I missing an include?

Finally, I tried with ConjugateGradient. Finally it compiles. But now I get:
error: ‘THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES’
.

Then, I cannot find information about the calculation of eigenvalues for sparse matrices. Should I just follow the instructions for dense matrices?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Can you be more specific about your errors?

for the iterative solvers,

#include <Eigen/IterativeSolvers>

SparseMatrix<double, RowMajor> A;
A.setFromTripplets(elements.begin(), elements.end());
BiCGSTAB<SparseMatrix<double, RowMajor> > bicg(A);

VectorXd b, x;
b = ...;
x = bicg.solve(b);


Note that ConjugateGradient is for symmetric problems only. If that's your case then it's recommended to use the ConjugateGradient instead of BiCGSTAB. In that case, you can also give a try to SimplicialLDLT (in Eigen/SparseCholesky).


Eigen does not permit to compute the eigen values of a sparse matrix.
liuwei
Registered Member
Posts
6
Karma
0
ggael wrote:Hi,

the SuperLUSupport module requires SuperLU to be installed and available in the path... You will also need to link against SuperLU and its dependency (blas, e.g., eigen_blas that you can find in build/blas/)


I find two directories in the Eigen directory (my directory: D:\Eigen\eigen3.2.1), and they are named respectively with "blas" and "lapack".
I wonder what and how I can do with these two directories?
The "readme.txt" contents:"This directory contains a BLAS library built on top of Eigen. This is currently a work in progress which is far to be ready for use, but feel free to contribute to it if you wish. This module is not built by default. In order to compile it, you need to type 'make blas' from within your build dir."
I dont understand the meaning? Is this unfinished and cant be used in practice?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
The readme is outdate! The blas interface is complete and perfectly usable!
liuwei
Registered Member
Posts
6
Karma
0
ggael wrote:The readme is outdate! The blas interface is complete and perfectly usable!


How exciting!
I will check it later.
Thank you!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]