[petsc-users] MatSetValues() for MATMPICUSP
recrusader
recrusader at gmail.com
Sat Feb 11 07:46:22 CST 2012
Dear Jed,
I am sorry that I cannot generate the errors using PETSc by itself.
However, it easy to generate the errors with libmesh.
There is an example from libmesh, that is
http://libmesh.sourceforge.net/ex4.php
I can run it using the command "ibrun -n 2 -o 0 ./introduction_ex4-dbg -d 3
-pc_type none -ksp_type gmres -vec_type mpicusp -mat_type mpiaijcusp
-ksp_view -ksp_monitor -log_summary -malloc_debug -cuda_show_devices" (You
should replace ibrun -n 2 -o 0 using mpiexec -n 2)
I get the same errors. However, when using "ibrun -n 2 -o 0
./introduction_ex4-dbg -d 3 -pc_type none -ksp_type gmres -ksp_view
-ksp_monitor -log_summary". I can run it successfully.
Thank you very much.
Best,
Yujie
On Sat, Feb 11, 2012 at 4:43 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Sat, Feb 11, 2012 at 00:00, recrusader <recrusader at gmail.com> wrote:
>
>> in
>> http://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex43.c.html
>>
>> Why are two matrices set to MATAIJ? if I set MATAIJCUSP, is them changed?
>>
>> 1468: DMCreateMatrix<http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DMCreateMatrix.html#DMCreateMatrix>
>> (da_Stokes,MATAIJ<http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MATAIJ.html#MATAIJ>
>> ,&A);
>>
>> 1469: DMCreateMatrix <http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DMCreateMatrix.html#DMCreateMatrix>(da_Stokes,MATAIJ <http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MATAIJ.html#MATAIJ>,&B);
>>
>>
> You have to follow the code down to where those matrices are used.
>
> 1478: AssembleA_Stokes(A,da_Stokes,da_prop,properties);
> 1479: AssembleA_PCStokes(B,da_Stokes,da_prop,properties);
>
> This uses a "block preconditioner", the B matrix is intentionally
> different from the A matrix in order to handle the saddle point.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120211/c316ab69/attachment.htm>
More information about the petsc-users
mailing list