<div dir="auto">I have added the configure option --with-cuda-gencodearch=XX to pass down such information to the external packages build. We are not currently using it in the library itself. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Sab 26 Set 2020, 06:08 Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><br><blockquote type="cite"><div>On Sep 25, 2020, at 8:36 PM, Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" target="_blank" rel="noreferrer">jacob.fai@gmail.com</a>> wrote:</div><br><div><div style="word-wrap:break-word;line-break:after-white-space"><blockquote type="cite"><div style="word-wrap:break-word;line-break:after-white-space"> Configure by default should find out the available GPU and build for that sm_* it should not require the user to set this (how the heck is the user going to know what to set?) If I remember correctly there is a utility available that gives this information. </div></blockquote>For CUDA I believe the tool is nvidia-smi. Should make sure this automatic detection works when configuring —with-batch though since login nodes might have different arch than compute.</div></div></blockquote><div><br></div> Would someone buying a machine be that perverse, they put a different GPU on the front end than the back end? Sadly, yes, your point is good, somehow on batch systems one wants the backend GPU information.</div><div><br></div><div> Maybe on Cray systems it is hidden in one of the six million environmental variables they set. </div><div><br></div><div> Barry</div><div><br><blockquote type="cite"><div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><div>
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div>Best regards,<br><br>Jacob Faibussowitsch<br>(Jacob Fai - booss - oh - vitch)<br>Cell: (312) 694-3391</div></div>
</div>
<div><br><blockquote type="cite"><div>On Sep 25, 2020, at 21:09, Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" rel="noreferrer">bsmith@petsc.dev</a>> wrote:</div><br><div><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div> Configure by default should find out the available GPU and build for that sm_* it should not require the user to set this (how the heck is the user going to know what to set?) If I remember correctly there is a utility available that gives this information. <div><br></div><div> For generic builds like in package distributions I don't know how it should work, ideally all the possibilities would be available in the library and at run time the correct one will be utilized. </div><div><br></div><div> Barry</div><div><br><div><br><blockquote type="cite"><div>On Sep 25, 2020, at 5:49 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" rel="noreferrer">mfadams@lbl.gov</a>> wrote:</div><br><div><div dir="ltr"> '--CUDAFLAGS=-arch=sm_70',<br><div><br></div><div>seems to fix this.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 25, 2020 at 6:31 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" rel="noreferrer">mfadams@lbl.gov</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">I see kokkos and hyper have a sm_70 flag, but I don't see one for PETSc.<br><br>It looks like you have to specify this to get modern atomics to work in Cuda. I get:<div><br></div><div>/ccs/home/adams/petsc/include/petscaijdevice.h(99): error: no instance of overloaded function "atomicAdd" matches the argument list<br> argument types are: (double *, double)<br></div><div><br></div><div>I tried using a Kokkos configuration, thinking I could get these sm_70 flags, but that did not work.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Mark</div></div>
</blockquote></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></blockquote></div>