Hi Guoxi,

do you run your code in parallel using mpirun? If you run the code in serial, then MATMPIAIJ is internally handled like MATSEQAIJ, which might explain the behavior you are seeing.

Best regards,
Karli



On 06/02/2014 09:13 AM, 张国熙 wrote:
Hi, all

Recently I'm trying to improve the performance of my program, so I add
-help option to see options available. I think I use MPIAIJ type of MAT,
but I receive information of SEQAIJ.

Is it means actually I am using a sequential matrix type?
If not, how could I get information of MPIAIJ to improve performance?

Code of generating mate
MatCreate(PETSC_COMM_WORLD,&A);
MatSetType(A,MATMPIAIJ);
MatSetSizes(A,PETSC_DECIDE, PETSC_DECIDE,size,size);
MatMPIAIJSetPreallocationCSR(A,Ap,Ai,temp);

Code of getting information
char  common_options[] = "-help  -st_ksp_type preonly -st_pc_type lu
-st_pc_factor_mat_solver_package mumps -mat_mumps_icntl_28 2
-mat_mumps_icntl_29 2";

ierr = PetscOptionsInsertString(common_options);CHKERRQ(ierr);

Thank you very much
Guoxi

Reply via email to