<html>#1974: Add WVUThorns_Diagnostics to the ET
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Zach Etienne</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>open</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td>ET_2018_08</td></tr>
<tr><td style='text-align:right'>  Version:</td><td>development version</td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Other</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>I am getting link time errors from the use of <code>number_of_reductions(int)</code> on Blue Waters using the gnu compiler. The error message is:</p>
<div class="codehilite"><pre><span></span>/mnt/a/u/staff/rhaas/ET_Proca/arrangements/WVUThorns_Diagnostics/VolumeIntegrals_vacuum/src/file_output_routines.C:179: undefined reference to `number_of_reductions(int)&#39;
</pre></div>


<p>and this code was introduced in <a data-is-external-link="true" href="https://bitbucket.org/zach_etienne/wvuthorns_diagnostics/commits/049ceffb501407436696077977c803763174877d" rel="nofollow">049ceff</a> (adding the inline and replacing some, but unfortunately not all, instances of its used by <code>#include "number_of_reductions.C"</code>, triggering the error) and in the initial upload.</p>
<p>This is /b the function is defined in <code>number_of_reductions.C</code> as <code>inline</code> however the C++ standard says (<a href="https://en.cppreference.com/w/c/language/inline" rel="nofollow" class="ap-connect-link">https://en.cppreference.com/w/c/language/inline</a>):</p>
<blockquote>
<p>If a non-static function is declared inline, then it must be defined in the same translation unit. The inline definition that does not use extern is not externally visible and does not prevent other translation units from defining the same function. </p>
</blockquote>
<p>where the key phrase is "same translation unit", which basically means "same call to the compiler".</p>
<p>The function would be incorrectly named for a function with external linkage since all thorn functions that are externally visible must be either in a namespace named after the thorn or have a prefix that includes (or is at least based on) the thorn name: <a href="https://www.einsteintoolkit.org/usersguide/UsersGuidech9.html#x13-139000C1.9.7" rel="nofollow" class="ap-connect-link">https://www.einsteintoolkit.org/usersguide/UsersGuidech9.html#x13-139000C1.9.7</a></p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/1974/add-wvuthorns_diagnostics-to-the-et'>https://bitbucket.org/einsteintoolkit/tickets/issues/1974/add-wvuthorns_diagnostics-to-the-et</a></p>
</html>