[Rd] C code hanging and printing everything at the end
Hi, I am currently writing an extension for R and have the need to include some C code. If I call the code with a large amount of data then it can take several minutes to complete. The C code prints out after a certain iteration hence letting the user know it hasn't crashed. When running in R this generally does not happen and all is printed out at the end once the program has completed successfully. I am using Rprintf() to print out the required output. e.g. Something simple which illustrates my point for(int i=0; i<1; i++){ #Calculations if (i%1000==0){ Rprintf("Step %d\n",i) } } All I get during the program is the OS X spinning wheel in R. Is there any way to print out as the program is running? Thanks, Rob __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Dangerous Bug with IF function of R
> > I'm intrigued. After such a blatantly wrong claim about a bug in > R... what exactly are you claiming about Matlab here? > That it implements (software) decimal arithmetic on top of the > cpu-internal binary arithmetic ? probably rather not ... > Just for confirmation the same thing doesn't work in MATLAB as one would expect. i=0; for j=1:11 i=i+0.1; if i==1 i end end __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Max likelihood using GPU
Hi Oyvind, I believe this is possible to implement. There is already some work ongoing in using the GPU in R and they use the CUDA toolkit as the reference you supplied do. http://brainarray.mbni.med.umich.edu/Brainarray/rgpgpu/ Thanks, Rob On 18 May 2011, at 10:07, oyvfos wrote: > Dear all, > Probably many of you experience long computation times when estimating large > number of parameters using maximum likelihood with functions that reguire > numerical methods such as integration or root-finding. Maximum likelihood is > an example of paralellization that could sucessfully utilize GPU. The > general algorithm is described here: > http://openlab-mu-internal.web.cern.ch/openlab-mu-internal/03_Documents/4_Presentations/Slides/2010-list/CHEP-Maximum-likelihood-fits-on-GPUs.pdf. > Is it possible to implement this algorithm in R ? > Kind regards, Oyvind Foshaug > > -- > View this message in context: > http://r.789695.n4.nabble.com/Max-likelihood-using-GPU-tp3532034p3532034.html > Sent from the R devel mailing list archive at Nabble.com. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel