<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Yes, Junchao said he gets the segfault, but it works for Karl. Sounds like this may be a case of one compiler liking the definitions for complex that Thrust uses, and some not, as Stefano says. Karl and Junchao, can you please share the version of the compilers
(and maybe associated settings) that you are using?<br>
<br>
--Richard<br>
<br>
<div class="moz-cite-prefix">On 5/21/20 9:15 AM, Junchao Zhang wrote:<br>
</div>
<blockquote type="cite" cite="mid:CA+MQGp-XiUCoh790+GUnh_TrR6G0u-mxGuVwUiuk9F7xncAvgQ@mail.gmail.com">
<div dir="ltr">I tested this example with cuda 10.2, it did segfault. I'm looking into it.<br clear="all">
<div>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">--Junchao Zhang</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, May 21, 2020 at 11:04 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" moz-do-not-send="true">knepley@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">
<div dir="ltr">On Thu, May 21, 2020 at 11:31 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" moz-do-not-send="true">stefano.zampini@gmail.com</a>> wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>Oh, there is also an issue I have recently noticed and did not have yet the time to fix it
<div><br>
<div>With complex numbers, we use the definitions for complexes from thrust and this does not seem to be always compatible to whatever the C compiler uses</div>
<div>Matt, take a look at petscsytypes.h and you will see the issue <a href="https://gitlab.com/petsc/petsc/-/blob/master/include/petscsystypes.h#L208" target="_blank" moz-do-not-send="true">https://gitlab.com/petsc/petsc/-/blob/master/include/petscsystypes.h#L208</a></div>
<div><br>
</div>
<div>For sure, you need to configure petsc with --with-clanguage=cxx, but even that does not to seem make it work on a CUDA box I have recently tried out (CUDA 10.1)</div>
<div>I believe the issue arise even if you call VecSet(v,0) on a VECCUDA</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>So Karl and Junchao say that with 10.2 it is working. Do you have access to 10.2?</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<div>
<div>
<div>
<div>
<blockquote type="cite">
<div>On May 21, 2020, at 6:21 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" moz-do-not-send="true">knepley@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div dir="ltr">On Thu, May 21, 2020 at 10:53 AM Rui Silva <<a href="mailto:rui.silva@uam.es" target="_blank" moz-do-not-send="true">rui.silva@uam.es</a>> wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Hello everyone,<br>
<br>
I am trying to run PETSc (with complex numbers in the GPU). When I call <br>
the VecWAXPY routine using the complex version of PETSc and mpicuda <br>
vectors, the program fails with a segmentation fault. This problem does <br>
not appear, if I run the complex version with mpi vectors or with the <br>
real version using mpicuda vectors. Is there any problem using <br>
CUDA+complex PETSc?<br>
<br>
Furthermore, I use the -log_view option to run the complex+gpu code, <br>
otherwise the program fails at the beggining.<br>
</blockquote>
<div><br>
</div>
<div>What version of CUDA do you have? There are bugs in the versions before 10.2.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Best regards,<br>
<br>
Rui Silva<br>
<br>
-- <br>
Dr. Rui Emanuel Ferreira da Silva<br>
Departamento de Física Teórica de la Materia Condensada<br>
Universidad Autónoma de Madrid, Spain<br>
<a href="https://ruiefdasilva.wixsite.com/ruiefdasilva" rel="noreferrer" target="_blank" moz-do-not-send="true">
https://ruiefdasilva.wixsite.com/ruiefdasilva</a><br>
<a href="https://mmuscles.eu/" rel="noreferrer" target="_blank" moz-do-not-send="true">
https://mmuscles.eu/</a><br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>