<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks very much for the stupid error and the advices. There should not have pcilu0 in call "PetscOptionsSetValue”.</div><div class=""><br class=""></div><div class="">Since I would like to create a shell pc (multicative and ...), I use PCCreate().</div><div class=""><br class=""></div><div class="">Kind reagards,</div><br class=""><div><blockquote type="cite" class=""><div class="">On 01 Nov 2015, at 17:18, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">  You need to learn how to use the debugger to debug this type of crash. In this case it is very simple just run the code in the debugger and when it crashes type "where" and "up" and "list" to see where it crashed. Make sure to use the debug version of the code.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">On Nov 1, 2015, at 7:39 AM, Feng Xing <<a href="mailto:snakexf@gmail.com" class="">snakexf@gmail.com</a>> wrote:<br class=""><br class="">Hello everyone,<br class=""><br class="">I would like to look for help for a small problem. I am trying to create a Hypre ilu(0) preconditioned in Fortran with the following code, where the matrix A_mpi has been created.<br class=""><br class="">   call PCCreate(MPI_COMM_WORLD, pcilu0, Ierr)<br class="">   CHKERRQ(Ierr)<br class="">   call PCSetOperators(pcilu0, A_mpi, A_mpi, Ierr)<br class="">   CHKERRQ(Ierr)<br class="">   call PCSetType(pcilu0, PCHYPRE, Ierr)<br class="">   CHKERRQ(Ierr)<br class="">   call PCHYPRESetType(pcilu0, 'euclid', Ierr)<br class="">   CHKERRQ(Ierr)<br class="">   call PetscOptionsSetValue(pcilu0, '-pc_hypre_euclid_levels', '0', Ierr)<span class="Apple-converted-space"> </span><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">    This is likely the problem since you are using totally the wrong first argument for this function.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">   Note also you would use KSPGetPC() and then set the PC and not use a PCCreate()</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">   CHKERRQ(Ierr)<br class=""><br class="">But, I got some segmentation errors. I tried to use valgrind, but it doesn’t report any errors.<span class="Apple-converted-space"> </span><br class="">[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br class="">[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br class=""><br class="">Thank you very much!<br class=""><br class="">Kind regards,<br class="">Feng Xing<br class="">Postdoc in France</blockquote></div></blockquote></div><br class=""></body></html>