<p>In <a href="https://github.com/mlpack/mlpack/pull/603#discussion_r61085875">src/mlpack/core/optimizers/parallel_sgd/sgdp_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +      {
&gt; +        continue;
&gt; +      }
&gt; +
&gt; +
&gt; +      #pragma omp critical 
&gt; +      {
&gt; +        sumIterate += tIterate[th_num];
&gt; +      }
&gt; +    
&gt; +      //wait untill all thread update sumIterate
&gt; +      #pragma omp barrier   
&gt; +
&gt; +
&gt; +      //runing  a single thread for tollerence checking
&gt; +      #pragma omp master
</pre>
<p>I thought that the tolerance checking was done for each algorithm individually.  As in, all you would need to do for this algorithm would be something like:</p>

<pre><code>#pragma omp parallel
{
  SGD sgd(...);
  sgd.Optimize(...);
}

// Then combine results.
</code></pre>

<p>I think that this could be a lot simpler still.  Since we already have the <code>SGD</code> class, why not use it? :)  Let me know if I've misunderstood something.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/603/files/a06e94df0ba373ab7661d2e2785aa57c94dc3b49#r61085875">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJ2MHjcBnboJxokTwMSKrrhElif0ks5p7hT7gaJpZM4H_54U.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/603/files/a06e94df0ba373ab7661d2e2785aa57c94dc3b49#r61085875"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>