<div dir="ltr">Unfortunately, I have not been able to find any common pattern. <div>I run it 10 times with the same dataset and It would crash only sometimes. </div><div><br></div><div>There's gotta be a race condition most likely related to threading as you said. </div><div><br></div><div>I explicitly tell DESeq to not use multi-threading though but I believe that</div><div>doesn't necessarily affect locfit. </div><div><br></div><div>Anyways, by digging into DESeq's R code I am able to avoid the potentially</div><div>race conditioned part by using a simpler fitting parameter. </div><div><br></div><div>So, the behaviour of RInside may be undefined if the R library does threading? </div><div><br></div><div>Thanks for help! </div><div><br></div><div>Best,</div><div>Jose</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-13 15:31 GMT+01:00 Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 13 December 2017 at 14:51, Jose wrote:<br>
| Hello,<br>
|<br>
| I am invoking some R code using RInside from a<br>
| C++ tool. Every time I invoke the code it crashes<br>
| randomly. Sometimes even with the same data. It never<br>
| crashes when I use R directly.<br>
|<br>
| I am invoking this function DESeq2::DESeq(data) which runs<br>
| a set of statistical operaions. It always crashes (when it does)<br>
| at this point "mean-dispersion relationship" and the system's log<br>
| shows that it always crashes at the same point:<br>
|<br>
| Thread 3 Crashed:: Thread (pooled)<br>
| 0   locfit.so                      0x00000001229b4b34 atree_grow + 20<br>
| (ev_atree.c:92)<br>
| 1   locfit.so                      0x00000001229b4d06 atree_grow + 486<br>
| (ev_atree.c:124)<br>
| 2   locfit.so                      0x00000001229b4d06 atree_grow + 486<br>
| (ev_atree.c:124)<br>
| 3   locfit.so                      0x00000001229b4d06 atree_grow + 486<br>
| (ev_atree.c:124)<br>
| 4   locfit.so                      0x00000001229b5259 atree_start + 1033<br>
| (ev_atree.c:167)<br>
| 5   locfit.so                      0x00000001229e384d startlf + 1053<br>
| (startlf.c:160)<br>
| 6   locfit.so                      0x00000001229a7147 slocfit + 1335<br>
| (S_enter.c:301)<br>
| 7   libR.dylib                    0x000000010d0ebcd5 do_dotCode + 5973<br>
| 8   libR.dylib                    0x000000010d1183d9 Rf_eval + 1657<br>
| (eval.c:728)<br>
|<br>
| locfit seems to be the R library for local regression fit.<br>
|<br>
| Is there something that I can do to overcome this issue?<br>
<br>
</div></div>Create smaller and smaller example that this exhibit the issue?<br>
<span class=""><br>
| Why would this happen if it never happens when I invoke DESeq from R<br>
| directly?.<br>
<br>
</span>Maybe locfit does something it is not supposed to do like threading?<br>
<br>
Dirk<br>
<span class=""><br>
| Thanks for the help.<br>
|<br>
| Best,<br>
| Jose<br>
</span>| ______________________________<wbr>_________________<br>
| Rcpp-devel mailing list<br>
| <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-<wbr>project.org</a><br>
| <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/rcpp-devel</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
</font></span></blockquote></div><br></div>