[Trilinos-Users] Parallel Epetra_LinearProblem

John Mitchell jamitch at sandia.gov
Thu Jun 10 14:29:00 MDT 2010


After further investigation -- I have uncovered a piece of evidence that 
I don't understand.

I have explicitly constructed an Epetra_CrsGraph using a different 
rowMap and columnMap:
Epetra_CrsGraph *graph = new 
Epetra_CrsGraph(Copy,rowMap,colMap,numCols.get(),true);

Later, I constructed a Epetra_FEVbrMatrix
 shared_ptr<Epetra_FEVbrMatrix> mPtr(new Epetra_FEVbrMatrix(Copy,*(graph)));

I then used some debug commands to print out the underlying data that 
each map stores -- this is used in the "CheckInput" of a 
Epetra_LinearProblem:
    cout << "computeJacobian:: mPtr->OperatorDomainMap().DataPtr() = " 
<< mPtr->OperatorDomainMap().DataPtr() << endl;
    cout << "computeJacobian:: rowMap.DataPtr() = " << rowMap.DataPtr() 
<< endl;
    cout << "computeJacobian::mPtr->OperatorRangeMap().DataPtr() = " << 
mPtr->OperatorRangeMap().DataPtr() << endl;
    cout << "computeJacobian:: colMap.DataPtr() = " << colMap.DataPtr() 
<< endl;

Results of the above print out don't make sense to me?  Notice how the 
Operator range and domain maps are the same?  Also notice that neither 
one matches the rowMap or colMap respectively?  I'm not quite sure how 
the operator domain and range maps are the same since I explicitly 
constructed the Operator with a different row and col maps.

computeJacobian:: mPtr->OperatorDomainMap().DataPtr() = 0x1b123cf0
computeJacobian:: rowMap.DataPtr() = 0x1b11ee40
computeJacobian::mPtr->OperatorRangeMap().DataPtr() = 0x1b123cf0
computeJacobian:: colMap.DataPtr() = 0x1b123460

Any comments or suggestions would be appreciated.
Thanks,
John

John Mitchell wrote:
> Hi,
>
> I am having trouble getting past the "CheckInput" stage for a 
> Epetra_LinearProblem.  In serial the problem runs fine, but in parallel 
> I fail 'CheckInput'.
>
> I successfully constructed and filled a graph checking all error flags 
> -- no failures or warnings.
>
> Similarly, I successfully constructed an Epetra_RowMatrix with the above 
> graph and then filled it checking all error flags -- no failures or 
> warnings.
>
> The last step is to create an Epetra_LinearProblem.
>
> Epetra_RowMatrix *mPtr = ...
> Epetra_LinearProblem linProblem;
> linProblem.SetOperator(mPtr);
> linProblem.AssertSymmetric();
>
> When I constructed both the Epetra_CrsGraph and Epetra_FEVbrMatrix I 
> used the following maps.
>     const Epetra_BlockMap& rowMap  = jacobian->getRowMap();
>     const Epetra_BlockMap& colMap  = jacobian->getColMap();
>
> Now, I created the RHS and LHS Epetra_Vectors : (this is simplified to 
> emphasize the maps I used)
>     double *u = ...;
>     double *f = ...;
>     Epetra_Vector rhs(View,rowMap,f);
>     Epetra_Vector lhs(View,colMap,u);
>     linProblem.SetRHS(&rhs);
>     linProblem.SetLHS(&lhs);
>     BOOST_CHECK(0==linProblem.CheckInput());
>
> I am failing the last check at the bottom with the error flag = -5?
>
> I thought that I was very careful to use the proper maps.  When I run 
> this in serial it runs correctly.  But when I run it in parallel it 
> fails the last error flag check? 
>
> Any thoughts/suggestions would be much appreciated.
>
> Thanks,
> John
>
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>   



More information about the Trilinos-Users mailing list