[petsc-users] using superlu_dist

Barry Smith bsmith at mcs.anl.gov
Fri Sep 10 19:21:55 CDT 2010


  Just always use SUPERLU_DIST for any number of processes including 1. It is much faster and uses less memory the superlu.

   Barry

You should only use superlu when the matrix is super ill-conditioned like condition number 10^10 and superlu_dist don't work

On Sep 10, 2010, at 4:43 PM, Matt Funk wrote:

> HI Barry,
> 
> thanks for the heads up, however, i am not using the command line.
> So what i did is when i set my pc i do:
> 
> if(m_preCondType == "LU_SUPERLU") {
>   m_ierr = PCSetType(m_pc, PCLU);
>   if (numProc() > 1) {
> 	PCFactorSetMatSolverPackage(m_pc,MAT_SOLVER_SUPERLU_DIST);
>   }
>    else {
>     PCFactorSetMatSolverPackage(m_pc,MAT_SOLVER_SUPERLU);
>    }
>  }
> 
> and the matrix type is set to MATAIJ. Anyway, but i still need to distingiush 
> between superlu and superlu_dist it seems as specifying superlu for a parallel 
> run throws an error. 
> 
> I suppose that when invoking this from the command line there is some code 
> that test to see whether this is a serial/parallel run and makes similar calls 
> as i did above?
> 
> 
> thank you
> matt
> 
> 
> 
> On Friday, September 10, 2010, Barry Smith wrote:
>>  This has all changed in the 3.0.0 release. It is much simpler now.
>> 
>>   Any ways you don't need  that crap for differences between 1 or more
>> processors. Just use MATAIJ always and use -pc_type lu
>> -pc_factor_mat_solver_package superlu_dist with 3.0.0 or later
>> 
>> 
>>   Barry
>> 
>> On Sep 10, 2010, at 3:59 PM, Matt Funk wrote:
>>> Hi,
>>> 
>>> i was wondering on how i need to set the matrix type when i want to use
>>> the superlu_dist solver.
>>> 
>>> Right now what i have is:
>>> if (m_preCondType == "LU_SUPERLU") {
>>> 
>>>   if (numProc() > 1)
>>> 
>>>     m_ierr = MatSetType(m_globalMatrix, MATAIJ);
>>> 
>>>   else {
>>> 
>>>     m_ierr = MatSetType(m_globalMatrix, MATSEQAIJ);
>>> 
>>>   }
>>> 
>>> }
>>> 
>>> This i believe is according to the table in the petsc users manual
>>> (p.82). Anyway, things work ok on 1 processor. However, when i try 8
>>> processors (i.e. it tells me:
>>> [3]PETSC ERROR: --------------------- Error Message
>>> ------------------------------------
>>> [3]PETSC ERROR: No support for this operation for this object type!
>>> [3]PETSC ERROR: Matrix format mpiaij does not have a built-in PETSc
>>> direct solver!
>>> 
>>> 
>>> So i guess i should not use the MATAIJ matrix format? I also tried the
>>> MATMPIAIJ format, but got the same problem.
>>> 
>>> So how is one supposed to use it? Obviously i am doing something wrong.
>>> Any help is appreciated.
>>> 
>>> thanks
>>> matt
> 



More information about the petsc-users mailing list