[Trilinos-Users] [EXTERNAL] trouble anasazi with mkl

Thornquist, Heidi K hkthorn at sandia.gov
Mon Jan 7 15:50:11 MST 2013


Hi SungHwan,

You need to set up the whole eigenproblem before calling "setProblem()".  It looks like you are setting the number of eigenvalues and the symmetry of the eigenproblem after you call "setProblem()".
So, the order of calls should be like this:

    Teuchos::RCP< Anasazi::BasicEigenproblem<double,MV,OP> > MyProblem = Teuchos::rcp( new Anasazi::BasicEigenproblem<double,MV,OP>(matrix, ivec) );
    MyProblem->setNEV( 5 );
    MyProblem->setHermitian(true);
    bool ierr = MyProblem->setProblem();

If you call "setProblem()" without having set the number of eigenvalues you are looking for, it will return false because NEV has not been specified.
This should take care of the error you are seeing from the BlockKrylovSchurSolMgr object.

Heidi


________________________________
From: trilinos-users-bounces at software.sandia.gov [trilinos-users-bounces at software.sandia.gov] on behalf of SungHwan Choi [sunghwanchoi91 at gmail.com]
Sent: Sunday, January 06, 2013 10:32 PM
To: trilinos-users at software.sandia.gov
Subject: [EXTERNAL] [Trilinos-Users] trouble anasazi with mkl

Hi ,
I have problem on anasazi. my anasazi

    Epetra_CrsMatrix* kinetic_matrix ;
    kinetic_matrix=new Epetra_CrsMatrix(Copy,Map,0);

    Teuchos::RCP< Anasazi::BasicEigenproblem<double,MV,OP> > MyProblem = Teuchos::rcp( new Anasazi::BasicEigenproblem<double,MV,OP>(matrix, ivec) );
    bool ierr = MyProblem->setProblem();
    cout << ierr <<endl;
    MyProblem->setNEV( 5 );
    MyProblem->setHermitian(true);
    int verb = Anasazi::Warnings + Anasazi::Errors+ Anasazi::FinalSummary + Anasazi::TimingDetails;
    // Create the parameter list for the eigensolver
    Teuchos::ParameterList MyPL;
    MyPL.set( "Verbosity", verb );
    MyPL.set( "Which", "SM" );
    MyPL.set( "Block Size", 8 );
    MyPL.set( "Num Blocks", 10 );
    MyPL.set( "Maximum Restarts", 100 );
    MyPL.set( "Convergence Tolerance", 1.0e-8 );
    // Create the Block Krylov Schur solver
    // This takes as inputs the eigenvalue problem and the solver parameters
    Anasazi::BlockKrylovSchurSolMgr<double,MV,OP> MyBlockKrylovSchur(MyProblem, MyPL );
    // Solve the eigenvalue problem, and save the return code
    Anasazi::ReturnType solverreturn = MyBlockKrylovSchur.solve();
    // Check return code of the solver: Unconverged, Failed, or OK
    switch (solverreturn) {
        // UNCONVERGED
        case Anasazi::Unconverged:
            if (verbose){
                cout << "Anasazi::BlockKrylovSchur::solve() did not converge!" << endl;
            }
            #ifdef HAVE_MPI
                MPI_Finalize();
            #endif
            return ;
            break;
        // CONVERGED
        case Anasazi::Converged:
            if (verbose){
                cout << "Anasazi::BlockKrylovSchur::solve() converged!" << endl;
            }
            break;
    }
    // Get eigensolution struct
    Anasazi::Eigensolution<double, Epetra_MultiVector> sol = MyProblem->getSolution();


and I compiled with -lmkl_intel_lp64 -lmkl_core -lmkl_sequential. I hope this will going well but I got error message as below

terminate called after throwing an instance of 'std::invalid_argument'
  what():  /usr/local/include/AnasaziBlockKrylovSchurSolMgr.hpp:266:
Throw number = 1
Throw test that evaluated to true: !_problem->isProblemSet()
Problem not set.


coud you give a piece of advice?

Sunghwan Choi


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130107/6bf6a63a/attachment.html 


More information about the Trilinos-Users mailing list