On Wed, Oct 27, 2010 at 4:22 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><br></div> Sending this to petsc-dev for better brains then mine to look at.</div></blockquote><div><br></div><div>Yes, this is what bombs on the new version of Thrust. I reported it and they know</div>
<div>about it. PETSc takes over VecType, and it would be much easier (maybe) for</div><div>Thrust to just namespace that thing.</div><div><br></div><div> Matt</div><div> </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"><div> Barry</div><div><br><div><br><div>Begin forwarded message:</div><br><blockquote type="cite"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>From: </b></span><span style="font-family:'Helvetica';font-size:medium">Victor Minden <<a href="mailto:victorminden@gmail.com" target="_blank">victorminden@gmail.com</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>Date: </b></span><span style="font-family:'Helvetica';font-size:medium">October 27, 2010 3:30:29 PM CDT<br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>To: </b></span><span style="font-family:'Helvetica';font-size:medium">Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium"><b>Subject: </b></span><span style="font-family:'Helvetica';font-size:medium"><b>Re: SACUDA - Cannot compile</b><br>
</span></div><br>Quick append: I realized that it would make the most sense to see if it compiles at all with just smoothed_aggregation.h included, and it does. This caused me to look further and see that the first line that kills the compiler and the next few ones I looked at were trying to define and then use a struct (inside many nested namespaces) called VecType, which rang a bell--since vectype is a flag for petsc, I assume we have a variable/struct/something somewhere that is causing the compiler to not let us use it again--though it should be valid since it's in a namespace. Is this mangling/namespace collision/something of the sort? What's the best way around it?<div>
<br></div><div><br clear="all">---<br>Victor L. Minden<br><br>Tufts University<br>School of Engineering<br>Class of 2012<br>
<br><br><div class="gmail_quote">On Wed, Oct 27, 2010 at 4:21 PM, Victor Minden <span dir="ltr"><<a href="mailto:victorminden@gmail.com" target="_blank">victorminden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm having trouble compiling with the new experimental versions of thrust and cusp, but only the sacuda preconditioner is affected. I pulled them out of their respective hg repositories and edited the version numbers so petsc would take them, and all the aijcuda and veccuda stuff seems to compile fine. However, when the compile gets to <a href="http://sacuda.cu/" target="_blank">sacuda.cu</a>, I get a whole bunch of<div>
<br></div><div><font color="#990000">/usr/local/cuda/bin/../include/thrust/detail/device/cuda/detail/b40c/vector_types.h(37): error: expected an identifier</font></div><div><br></div><div>and similar errors in two different files (make.log attached).</div>
<div><br></div><div>I pulled everything out of <a href="http://sacuda.cu/" target="_blank">sacuda.cu</a> except for the include statements (end of email[1]), but it still says the same thing. Looking around online, I guess this could be a C/C++ problem, maybe needing some extern magic or something? The internet is not being very helpful. </div>
<div><br></div><div>The files that are affecting things were both added to Thrust *after* the last time we've looked at sacuda, vector_types.h [2] and radixsort_scanscatter_kernel.h [3]. These appear to be both part of a bundled radixsort code from an external source. The files are protected at the top by a #pragma once, but I think we're ignoring pragmas (? or at least we have the flag -Wnounknownpragmas) so I tried popping in an if !defined and such to no avail.</div>
<div><br></div><div>Does anything come to mind as a likely source of this problem?</div><div><br></div><div>-Victor</div><div><br></div><div><br></div><div><br></div><div><br></div><div>[1]</div><div><div><font color="#990000">#define PETSCKSP_DLL</font></div>
<div><font color="#990000"><br></font></div><div><font color="#990000">/* -------------------------------------------------------------------- */</font></div><div><font color="#990000"><br>
</font></div><div><font color="#990000">/* </font></div><div><font color="#990000"> Include files needed for the CUDA Smoothed Aggregation preconditioner:</font></div><div>
<font color="#990000"> pcimpl.h - private include file intended for use by all preconditioners </font></div><div><font color="#990000">*/</font></div><div><font color="#990000"><br>
</font></div><div><font color="#990000">#include "private/pcimpl.h" /*I "petscpc.h" I*/</font></div><div><font color="#990000">#include "../src/mat/impls/aij/seq/aij.h"</font></div>
<div><font color="#990000">#include <cusp/precond/smoothed_aggregation.h></font></div><div><font color="#990000">#include "../src/vec/vec/impls/dvecimpl.h"</font></div>
<div><font color="#990000">#include "../src/mat/impls/aij/seq/seqcuda/cudamatimpl.h"</font></div><div><br></div><div><br></div><div>[2]</div><div><a href="http://code.google.com/p/thrust/source/browse/thrust/detail/device/cuda/detail/b40c/vector_types.h" target="_blank">http://code.google.com/p/thrust/source/browse/thrust/detail/device/cuda/detail/b40c/vector_types.h</a></div>
<div><br></div><div>[3]</div><div><a href="http://code.google.com/p/thrust/source/browse/thrust/detail/device/cuda/detail/b40c/radixsort_scanscatter_kernel.h" target="_blank">http://code.google.com/p/thrust/source/browse/thrust/detail/device/cuda/detail/b40c/radixsort_scanscatter_kernel.h</a></div>
---<br>Victor L. Minden<br><br>Tufts University<br>School of Engineering<br>Class of 2012<br>
</div>
</blockquote></div><br></div>
</blockquote></div><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>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<br>