回复: 回复: about combining the GMRES and smooth methods

jiaxun hou jiaxun_hou at yahoo.com.cn
Sat Jan 27 23:03:55 CST 2007


I am sorry. This is the error message:

g++ -c -Wall -Wshadow -Wwrite-strings -fomit-frame-pointer -Wno-strict-aliasing -g3   -PIC    -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   -I/home/software/mpich2/include       -D__SDIR__='"src/ksp/ksp/impls/gmres/"'  gmres.c
g++: unrecognized option '-PIC'
gmres.c: In function ‘PetscErrorCode KSPSolve_GMRES(_p_KSP*)’:
gmres.c:259: error: invalid use of undefined type ‘struct _p_PC’
/home/software/petsc-2.3.1-p10/include/petscpc.h:27: error: forward declaration of ‘struct _p_PC’
make[1]: [/home/software/petsc-2.3.1-p10/lib/linux-gnu-cxx-complex-debug/libpetscksp.a(gmres.o)] Error 1 (ignored)
/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
make[1]: [/home/software/petsc-2.3.1-p10/lib/linux-gnu-cxx-complex-debug/libpetscksp.a(gmres.o)] Error 1 (ignored)
if test -n ""; then /usr/bin/ar cr  gmres.lo; fi
/bin/rm -f gmres.o gmres.lo

It said that the struct _p_PC was undefined. But it seems impossible. I dont know where is wrong?

Thanks!

----- 原始邮件 ----
发件人: Barry Smith <bsmith at mcs.anl.gov>
收件人: petsc-users at mcs.anl.gov
已发送: 2007/1/28(周日), 下午12:43:28
主题: Re: 回复: about combining the GMRES and smooth methods


  If you want help with why a compile fails you need to at least
send the entire output when the compile fails.

   Barry


On Sun, 28 Jan 2007, jiaxun hou wrote:

> But I already had another preconditioner. I want to study the behave of  the smooth method in the GMRES with my preconditioner. How can I do?
 Thanks!
-------------------------------------------------------------


----- 原始邮件 ----
发件人: Barry Smith <bsmith at mcs.anl.gov>
收件人: petsc-users at mcs.anl.gov
已发送: 2007/1/28(周日), 上午11:28:35
主题: Re: about combining the GMRES and smooth methods


It seems extremely likely that you do not want to do this.

  If you want to use SOR or SSOR as a preconditioner for GMRES simply
use -pc_type sor; see the manual page for PCSOR for other options.

   Barry


On Sun, 28 Jan 2007, jiaxun hou wrote:

> Hi, 
I want to add a smooth method in the GMRES routine.  I do it in the function KSPSolve_GMRES of  /src/ksp/ksp/impls/gmres/gmres.c. The code likes that:

PetscErrorCode KSPSolve_GMRES(KSP ksp) {
.....
     ierr = GMREScycle(&its,ksp);CHKERRQ(ierr);
     
     ierr = MatRelax(ksp->pc->mat, ksp->vec_rhs,1,SOR_FORWARD_SWEEP,0,1,1,ksp->vec_sol);CHKERRQ(ierr);
.....
}

But  compile fail. Is it the right way? 
Thanks.


        
___________________________________________________________ 
雅虎免费邮箱-3.5G容量,20M附件 
http://cn.mail.yahoo.com/


        
___________________________________________________________ 
抢注雅虎免费邮箱-3.5G容量,20M附件! 
http://cn.mail.yahoo.com






	

	
		
___________________________________________________________ 
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20070128/957462d0/attachment.htm>


More information about the petsc-users mailing list