<div class="gmail_quote">2011/6/6 Dürrwang, Jürgen <span dir="ltr">&lt;<a href="mailto:Juergen.Duerrwang@iosb.fraunhofer.de">Juergen.Duerrwang@iosb.fraunhofer.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Yes, I tried some PETSC examples and I modified one for my stuff. It works very well on my Xeon quadcore, but my intention is to mix CPU and GPU code. I want a paralell domain decomposition using jacobi block method for runing ILU(0) on each block(number of blocks = number of CPU cores). Then I want to take the results of each blocksolution as a preconditioner for a cg solver on GPU.</span></p>
</blockquote><div><br></div><div>What is the GPU going to do while this is taking place on the CPU? I don&#39;t see much point doing CG on the GPU if you don&#39;t also move the matrix and preconditioner there. (The performance may even be worse than doing everything on the CPU.)</div>
<div><br></div><div>Have you read the docs on running PETSc on GPUs?</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#gpus">http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#gpus</a></div>
<div><a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/installation.html#CUDA">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/installation.html#CUDA</a></div><div><br></div><div>There is no ILU on the GPU because nobody has written it (because it seems to be ill-suited to the execution model).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal">
<span lang="EN-US" style="font-size:11.0pt;color:#1F497D">At the moment I can decompose my matrix in  four jacobi block matrices. I compared my results with petsc and they are the same. But now I don’t know if I have to run my cg solver on each block or could I put the results of each blocked-ILU together and the use this as preconditioner for the non blocked matrix(my large input matrix).</span></p>
</blockquote></div><br><div>You can do either of these; -pc_type asm -sub_ksp_type cg -sub_pc_type icc, for example. Be careful about symmetry and remember to use FGMRES if you make the preconditioner nonlinear.</div>