Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML: Smoothers that support our data matrices #5665

Closed
srinadhupreetham opened this issue Aug 6, 2019 · 12 comments
Closed

ML: Smoothers that support our data matrices #5665

srinadhupreetham opened this issue Aug 6, 2019 · 12 comments

Comments

@srinadhupreetham
Copy link

Few Smoothers and Coarse List are resulting in a segmentation fault with my input A(data matrix). Is there a way to know what are the smoothers that will work for my specific data matrix

@mayrmt
Copy link
Member

mayrmt commented Aug 6, 2019

@trilinos/ml

@mhoemmen
Copy link
Contributor

mhoemmen commented Aug 6, 2019

Is there a way to know what are the smoothers that will work for my specific data matrix

I would recommend a book on multigrid. Beyond that, experience (either yours or your colleague's) is your best guide.

@srinadhupreetham
Copy link
Author

Basically, I am dealing with a large data set of matrices where each matrix will be of different types. So it is not possible to go through each of them manually. Is there a way to know what are the smoothers that work for the particular matrix through code

@mhoemmen
Copy link
Contributor

mhoemmen commented Aug 6, 2019

Is there a way to know what are the smoothers that work for the particular matrix through code

Short answer is "no."

Longer answer: You can use code to tell if the matrix is symmetric. Testing if the matrix is positive definite is more costly. The fastest way to tell if incomplete Cholesky or ILU work on a general matrix is probably just to try them.

@jhux2
Copy link
Member

jhux2 commented Aug 6, 2019

Please give us some more information about the type of systems you’re interested in solving. As @mhoemmen mentioned, our suggestions will depend on your answers. The more details you can provide, the better.

@srinadhupreetham
Copy link
Author

srinadhupreetham commented Aug 7, 2019

I am trying to find solvation time for Ax =b with A matrix as 494_bus.mtx from https://sparse.tamu.edu/HB/494_bus.

Some Combinations of these parameters are not working:
ex:1.max levels:5
2.smoother: Gauss-Seidel
3.aggregation: Uncoupled
4. smoother sweeps : 3
5.coarse type : Guass-Seidel

*** I would like to know what combinations will work and what wont as i need to wright a script that does the same for large dataset ***

//////code part for parameters/////
int maxlevels[5] = {5,8,10,13,15};
string IncreaseOrDecrease[2] = {"increasing","decreasing"};
string aggregationType[6] ={"Uncoupled","MIS","Uncoupled-MIS","METIS","ParMETIS"};
string smootherType[9] ={"Jacobi","Gauss-Seidel","symmetric Guass-Seidel","block Gauss-Seidel","block symmetric Guass-Seidel","Chebyshev","IC","Aztec","petsc"};
string coarseType[9] ={"Jacobi","Guass-Seidel","symmetric Gauss-Seidel","Chebyshev","Hiptmair","Amesos-KLU","Amesos-Superlu","Amesos-MUMPS","SuperLU"};
int smootherSweeps[3] ={3,5,7};
string smootherPreOrPost[3] = {"pre","post","both"};
ParameterList MLList;
ML_Epetra::SetDefaults("SA",MLList);
MLList.set("ML output", 10);
MLList.set("max levels",5);
MLList.set("increasing or decreasing","increasing");
MLList.set("aggregation: type", "Uncoupled");
MLList.set("smoother: type",smootherType[1]);
MLList.set("smoother: sweeps",3);
MLList.set("smoother: pre or post", "both");
MLList.set("coarse: type",coarseType[temp1]);
/////////////////////////////////////////////////////////////////////////////////
ML_Epetra::MultiLevelPreconditioner* MLPrec =
new ML_Epetra::MultiLevelPreconditioner(*A, MLList);

@mhoemmen
Copy link
Contributor

mhoemmen commented Aug 7, 2019

I would recommend taking a multigrid tutorial (MueLu has one; not sure about ML, but there is a Users' Guide) and reading up on multigrid. There's no automatic mapping from matrix to multigrid parameters.

@mayrmt
Copy link
Member

mayrmt commented Aug 7, 2019

@srinadhupreetham
Copy link
Author

Is there way where i can print only solution time instead of verbose description of the warnings and output

@mayrmt
Copy link
Member

mayrmt commented Aug 7, 2019

If yes, then it’s probably described in the user guides. If no, you can just put your own timers around the ML call.

@jhux2
Copy link
Member

jhux2 commented Aug 7, 2019

@srinadhupreetham The AMG methods in ML and MueLu are really designed for PDE-based systems, the matrix you're trying to solve is from a power network. Have you read papers or other references that suggest that AMG will work for this type of system?

If you just want the solution time, grep will work.

@jhux2
Copy link
Member

jhux2 commented Aug 14, 2019

Closing, but please reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants