[Rd] How to safely using OpenMP pragma inside a .C() function?

From: Alireza Mahani <alireza.s.mahani_at_gmail.com>
Date: Mon, 29 Aug 2011 11:48:52 -0700 (PDT)

I am trying to parallelize part of a C function that is called from R (via .C) using OpenMP's "parallel for" pragma. I get mixed results: some runs finish with no problem, but some lead to R crashing after issuing a long error message involving memory violations.

I found this post, which describes how a .Call() function can be made to avoid crashing R by raising the stack limit:


However, trying this in my .C function doesn't help things. Any suggestions/tips on whether I can safely use OpenMP inside a .C function, and if yes how?

Thank you,
Alireza Mahani

View this message in context: http://r.789695.n4.nabble.com/How-to-safely-using-OpenMP-pragma-inside-a-C-function-tp3777036p3777036.html
Sent from the R devel mailing list archive at Nabble.com.

R-devel_at_r-project.org mailing list
Received on Mon 29 Aug 2011 - 18:50:39 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 30 Aug 2011 - 00:50:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive