[Rd] helping out

Kevin B. Hendricks kevin.hendricks at sympatico.ca
Fri May 19 17:37:49 CEST 2006


Hi,

I have built my own tuned atlas libs enabling multiple processors and  
pthread support.  Then based on the note on page 23 of the "R  
Installation and Administration" manual, I added --disable-R- 
profiling to the configuration options

Unfortunately, the code in R/src/main/eval.c [updated from trunk this  
morning] references the static variable R_Profiling outside of the  
R_PROFILING ifdef which protects it declaration.

One possible solution would be the following.  Of course, you may  
want the static variable to exist all of the time but keep its 0  
value (ie. move its declaration outside the ifdef).

Hope this helps (the patch is only for demonstration purposes since  
you may want a different solution.


--- eval.c.prev 2006-05-19 11:28:54.000000000 -0400
+++ eval.c      2006-05-19 11:28:22.000000000 -0400
@@ -432,7 +432,11 @@
             R_Visible = 1 - PRIMPRINT(op);
             /* We used to do insert a context only if profiling,
                but helps for tracebacks too. */
+#ifdef R_PROFILING
             if (R_Profiling || (PPINFO(op).kind == PP_FOREIGN)) {
+#else
+           if (PPINFO(op).kind == PP_FOREIGN) {
+#endif
                 begincontext(&cntxt, CTXT_BUILTIN, e,
                              R_BaseEnv, R_BaseEnv, R_NilValue,  
R_NilValue);
                 tmp = PRIMFUN(op) (e, op, tmp, rho);

Kevin



More information about the R-devel mailing list