<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 4 Sep 2015, at 16:11, Comer Duncan <<a href="mailto:comer.duncan@gmail.com">comer.duncan@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I have pasted the attempted build to pastebin: <a href="http://pastebin.com/YNDgRKNV">http://pastebin.com/YNDgRKNV</a><div><br></div><div>There are several complaints there which may be either due to unseen errors in my Kranc script or other unrelated things. Please let me know if you see something. Thanks very much.</div></div></blockquote><div><br></div><div>Aha! You have a calculation with a name which is the same as the thorn name. Kranc uses the thorn name as a C++ namespace, and calculation names as C++ function names, and these are not allowed to conflict. This is the error you are seeing:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• In file included from /Users/comerduncan/Cactus/arrangements/Cosmology/CT_BrillAnalytic/src/CT_BrillAnalytic.cc:14:0:<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• /Users/comerduncan/Cactus/arrangements/Cosmology/CT_BrillAnalytic/src/Kranc.hh:10:28: error: 'namespace CT_BrillAnalytic { }' redeclared as different kind of symbol<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• namespace CT_BrillAnalytic {<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• ^<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• In file included from /Users/comerduncan/Cactus/configs/sim/bindings/include/CT_BrillAnalytic/cctk.h:6:0,<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• from /Users/comerduncan/Cactus/arrangements/Cosmology/CT_BrillAnalytic/src/CT_BrillAnalytic.cc:11:<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• /Users/comerduncan/Cactus/configs/sim/bindings/include/CT_BrillAnalytic/cctk_ScheduleFunctions.h:35:6: note: previous declaration 'void CT_BrillAnalytic(cGH*)'<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• void CT_BrillAnalytic (CCTK_ARGUMENTS) CCTK_ATTRIBUTE_NONNULL(1);<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>• ^<br></div><div><br></div><div>I had never thought of this issue before; Kranc should prevent you from doing this and give an error at Kranc time. I just created in issue for this: <a href="https://github.com/ianhinder/Kranc/issues/132">https://github.com/ianhinder/Kranc/issues/132</a>. You should just be able to change the name of the calculation from thornName to thornName <> "_<something>".</div><div><br></div><div>In general, I would recommend prefixing all calculation names with the thorn name, to avoid possible conflicts with other thorns. Cactus doesn't have any thorn-based scoping mechanism, so all scheduled functions are in the same namespace. You have some calculations called "formgk" and "gupper". Probably they are fine, but in principle they could conflict with other thorns, so prefixing the names with the thorn name is much safer.</div><div><br></div><div>Ideally, I think I would like Kranc to automatically add such a prefix, but this would break backward compatibility. Maybe Kranc should print a warning if the calculation name does not start with the thorn name (<a href="https://github.com/ianhinder/Kranc/issues/133">https://github.com/ianhinder/Kranc/issues/133</a>).</div></div><div><br></div></div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>-- </div><div>Ian Hinder</div><div><a href="http://members.aei.mpg.de/ianhin">http://members.aei.mpg.de/ianhin</a></div></div></div></div></div>
</div>
<br></body></html>