<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">I am sorry. This is the error message:<br><br>g++ -c -Wall -Wshadow -Wwrite-strings -fomit-frame-pointer -Wno-strict-aliasing -g3&nbsp;&nbsp; -PIC&nbsp;&nbsp;&nbsp; -I/home/software/petsc-2.3.1-p10 -I/home/software/petsc-2.3.1-p10/bmake/linux-gnu-cxx-complex-debug -I/home/software/petsc-2.3.1-p10/include&nbsp;&nbsp; -I/home/software/mpich2/include&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -D__SDIR__='"src/ksp/ksp/impls/gmres/"'&nbsp; gmres.c<br>g++: unrecognized option '-PIC'<br>gmres.c: In function ‘PetscErrorCode KSPSolve_GMRES(_p_KSP*)’:<br>gmres.c:259: error: invalid use of undefined type ‘struct _p_PC’<br>/home/software/petsc-2.3.1-p10/include/petscpc.h:27: error: forward declaration of ‘struct _p_PC’<br>make[1]:
 [/home/software/petsc-2.3.1-p10/lib/linux-gnu-cxx-complex-debug/libpetscksp.a(gmres.o)] Error 1 (ignored)<br>/usr/bin/ar cr /home/software/petsc-2.3.1-p10/lib/linux-gnu-cxx-complex-debug/libpetscksp.a gmres.o/usr/bin/ar: gmres.o: No such file or directory<br>make[1]: [/home/software/petsc-2.3.1-p10/lib/linux-gnu-cxx-complex-debug/libpetscksp.a(gmres.o)] Error 1 (ignored)<br>if test -n ""; then /usr/bin/ar cr&nbsp; gmres.lo; fi<br>/bin/rm -f gmres.o gmres.lo<br><br>It said that the struct _p_PC was undefined. But it seems impossible. I dont know where is wrong?<br><br>Thanks!<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- 原始邮件 ----<br>发件人: Barry Smith &lt;bsmith@mcs.anl.gov&gt;<br>收件人: petsc-users@mcs.anl.gov<br>已发送: 2007/1/28(周日), 下午12:43:28<br>主题: Re: 回复: about combining the GMRES and smooth methods<br><br><div><br>&nbsp;&nbsp;If you want help with why a compile fails you
 need to at least<br>send the entire output when the compile fails.<br><br>&nbsp;&nbsp; Barry<br><br><br>On Sun, 28 Jan 2007, jiaxun hou wrote:<br><br>&gt; But I already had another preconditioner. I want to study the behave of&nbsp;&nbsp;the smooth method in the GMRES with my preconditioner. How can I do?<br> Thanks!<br>-------------------------------------------------------------<br><br><br>----- 原始邮件 ----<br>发件人: Barry Smith &lt;bsmith@mcs.anl.gov&gt;<br>收件人: petsc-users@mcs.anl.gov<br>已发送: 2007/1/28(周日), 上午11:28:35<br>主题: Re: about combining the GMRES and smooth methods<br><br><br>It seems extremely likely that you do not want to do this.<br><br>&nbsp;&nbsp;If you want to use SOR or SSOR as a preconditioner for GMRES simply<br>use -pc_type sor; see the manual page for PCSOR for other options.<br><br>&nbsp;&nbsp; Barry<br><br><br>On Sun, 28 Jan 2007, jiaxun hou wrote:<br><br>&gt; Hi, <br>I want to add a smooth method in the
 GMRES routine.&nbsp;&nbsp;I do it in the function KSPSolve_GMRES of&nbsp;&nbsp;/src/ksp/ksp/impls/gmres/gmres.c. The code likes that:<br><br>PetscErrorCode KSPSolve_GMRES(KSP ksp) {<br>.....<br>&nbsp;&nbsp;&nbsp;&nbsp; ierr = GMREScycle(&amp;its,ksp);CHKERRQ(ierr);<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; ierr = MatRelax(ksp-&gt;pc-&gt;mat, ksp-&gt;vec_rhs,1,SOR_FORWARD_SWEEP,0,1,1,ksp-&gt;vec_sol);CHKERRQ(ierr);<br>.....<br>}<br><br>But&nbsp;&nbsp;compile fail. Is it the right way? <br>Thanks.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>___________________________________________________________ <br>雅虎免费邮箱-3.5G容量,20M附件 <br><a target="_blank" href="http://cn.mail.yahoo.com/">http://cn.mail.yahoo.com/</a><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>___________________________________________________________ <br>抢注雅虎免费邮箱-3.5G容量,20M附件! <br><a target="_blank"
 href="http://cn.mail.yahoo.com">http://cn.mail.yahoo.com</a></div></div><br></div></div><br>
                <hr size=1><a href="http://cn.mail.yahoo.com" target=blank>抢注雅虎免费邮箱-3.5G容量,20M附件!</a> </body></html>