<p>When I run <code>mlpack_allknn</code> from your branch, the final output is mangled:</p>

<pre><code>[DEBUG] Compiled with debugging symbols.
[WARN ] Neither --neighbors_file nor --distances_file is specified, so the nearest neighbor search results will not be saved!
[INFO ] Loading 'test_data_3_1000.csv' as CSV data.  Size is 3 x 1000.
[INFO ] Loaded reference data from 'test_data_3_1000.csv' (3 x 1000).
[INFO ] Building reference tree...
[INFO ] Tree built.
[INFO ] Searching for 3 nearest neighbors with dual-tree kd-tree search...
[INFO ] 18080 node combinations were scored.
[INFO ] 43890 base cases were calculated.
[INFO ] Search complete.
`-t1000.cs
`-t1000.csExecution parameters:
`-tn parameter  distances_file: ""
`-tn parameter  help: false
�-thelp info.  info: ""
input_model_file.  input_model_file: ""
�-tdel_file.  k: 3
�-tfile.  leaf_size: 20
�-tfile.  naive: false
`-ta_3_1000.cs  neighbors_file: ""
`-ta_3_1000.cs  output_model_file: ""
`-todel_files  query_file: ""
`-todel_files  random_basis: false
�-t_files  reference_file: test_data_3_1000.csv
�-ta_3_1000.cs  seed: 0
�-t1000.cs  single_mode: false
`-ta_3_1000.cs  tree_type: kd
`-ta_3_1000.cs  verbose: true
�-t1000.cs  version: false
`-ta_3_1000.cs
`-ta_3_1000.csProgram timers:
`-ta_3_1000.cs  computing_neighbors: 0.087338s
`-tg_neighbors  loading_data: 0.003345s
`-tg_neighbors  total_time: 0.095910s
`-tg_neighbors  tree_building: 0.002784s
</code></pre>

<p>I think that this is because the <code>CLIDeleter</code> is maybe doing its job too early?  I'm not sure, I will have to dig into it further.  The problem is probably a result of having <code>CLIDeleter</code> in a different compilation unit; I'm not sure.  Any thoughts or ideas?  I like the idea of this PR, we just have to make sure output isn't mangled on things that link to mlpack.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/521#issuecomment-183386689">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFIJ0U3_OM_40hicpee62jtZPBipqks5pjfnEgaJpZM4HX7Db.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/521#issuecomment-183386689"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>