From kevin.hendricks at sympatico.ca  Fri May 19 17:37:49 2006
From: kevin.hendricks at sympatico.ca (Kevin B. Hendricks)
Date: Fri, 19 May 2006 11:37:49 -0400
Subject: [Rd] helping out
In-Reply-To: <Pine.LNX.4.64.0605181908170.8076@gannet.stats.ox.ac.uk>
References: <8A036DC9-74BA-4AB2-B6AB-7C20BFC9D5B2@sympatico.ca>
	<Pine.LNX.4.64.0605181051590.21587@homer24.u.washington.edu>
	<Pine.LNX.4.64.0605181908170.8076@gannet.stats.ox.ac.uk>
Message-ID: <AA227BF1-7377-4A52-8462-B4031F24F0EE@sympatico.ca>

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



[Rd] helping out
Kevin B. Hendricks