<div dir="ltr">Problem is solved. I was calling a KSP routine before creating the KSP context. <br><br>Best Regards,<br>Pranay.</div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=acHJhbmF5cmVkZHk4NjVAZ21haWwuY29t&type=zerocontent&guid=e83bd1b6-a66c-48a3-aad0-012a0c5750dc"><font color="#ffffff" size="1">ᐧ</font></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 19, 2020 at 6:00 PM baikadi pranay <<a href="mailto:pranayreddy865@gmail.com">pranayreddy865@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><br>I am trying to build a 2D poisson solver using BiCGStab in FORTRAN 90. After I form the A matrix and create the x and b vectors, I call the routine KSPSetInitialGuessNonzero, so that I can pass a specific initialization of the x-vector to the solver. However, when I do this I run into a Segmentation Violation at this line. I am not sure why I am running into this problem. I am attaching the screenshot of the error message, and would appreciate any help you can provide.<br><br>Please let me know if you need any further information.<br><br>Thank you.<br><br>Best Regards,<br>Pranay.</div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width: 0px; max-height: 0px; overflow: hidden;" src="https://mailfoogae.appspot.com/t?sender=acHJhbmF5cmVkZHk4NjVAZ21haWwuY29t&type=zerocontent&guid=357e2d39-3e67-4491-a89a-36b5000d51a7"><font color="#ffffff" size="1">ᐧ</font></div>
</blockquote></div>