similar to: C code hanging and printing everything at the end

Displaying 20 results from an estimated 20000 matches similar to: "C code hanging and printing everything at the end"

2004 Jun 14
5
mkChar can be interrupted
Hi, As was discussed earlier in another thread and as documented in R-exts .Call() should not be interruptible by Ctrl-C. However the following code, which spends most of its time inside mkChar, turned out to be interruptible on RH-7.3 R-1.8.1 gcc-2.96: #include <Rinternals.h> #include <R.h> SEXP foo0(const SEXP nSexp) { int i, n; SEXP resSexp; if (!isInteger(nSexp))
2014 Dec 20
2
Unexplained difference between results of dppsv and dpotri LAPACK routines
Dear R contributors, Considering the following sample C code, that illustrates two possible uses of a Cholesky decomp for inverting a matrix, equally valid at least in theory: SEXP test() { int d = 2; int info = 0; double mat[4] = {2.5, 0.4, 0.4, 1.7}; double id[4] = {1.0, 0.0, 0.0, 1.0}; double lmat[3]; F77_CALL(dpotrf)("L", &d, mat, &d, &info); lmat[0] = mat[0]; lmat[1]
2007 Feb 07
3
Redirect --stats to STDERR.
Hello, I have written a little script that's would email me all errors. rsync -vah --delete --stats <sources> <destination> > /var/log/sauvegarde/listoffile.log 2> /var/log/sauvegarde/errors.log My problem is i want to have the stats in my mail. Is it possible to redirect --stats to STDERR. I have tryed to do this : /---
2005 Dec 02
1
Printing to file from C
Hello, I am interfacing R and C code using the function .Call. Is there any way to print to file form C? I.e. is there something analogous to: fopen(file1, "w"); fprintf(file1, "%f", ... ); fclose(file1); which would not cause an error in the excution? The Writing R Extension manual does not seem to provide a lot of insights other than a vague reference to an
2004 Jan 27
1
Differentiating debug messages from both sides
Some of the debug messages that rsync outputs (when verbose >= 2) can occur on both sides of the connection. This makes it hard to know which program is saying what. Some debug messages deal with this by outputting a "[PID]" string at the start of the message. Unfortunately, the startup message that tells us which pid is which is only output when verbose >= 3, so there's a
2009 Jun 12
1
Can't get F77_CALL(dgemm) to work [SEC=UNCLASSIFIED]
Hi I am new to writing C code and am trying to write an R extension in C. I have hit a wall with F77_CALL(dgemm) in that it produces wrong results. The code below is a simplified example that multiplies the matrices Ab and Bm to give Cm. The results below show clearly that Cm is wrong. Am= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Bm= 1 1 1 1 1
2002 Aug 05
5
[patch] read-devices
Greetings, I'd like to propose a new option to rsync, which causes it to read device files as if they were regular files. This includes pipes, character devices and block devices (I'm not sure about sockets). The main motivation is cases where you need to synchronize a large amount of data that is not available as regular files, as in the following scenarios: * Keep a copy of a block
2003 Feb 02
1
printing reals from C with digits -- once more
Thank for Brian D. Ripley for the answer to my previous question. My aim is to print single values from different real vectors with different digits option. This is quite a possible with Rprintf() but that one supprots printing format as C does, not in R native way (setting digits=7 or printing with "%12.7f" are two quite different things). So I would like to find something more
2002 May 04
1
A simpler move-files patch
In an effort to get my long-desired move-files functionality into rsync, I have created a version of my patch that runs as an extra pass at the end of the processing. This results in a simpler set of changes to rsync. I still think it would be nice to have incremental deletions during large transfers (as my first patch provides), but acceptance of this patch would relegate such quibbling to a
2017 Jun 30
1
Rprintf expected encoding
I'm trying to find information about how to use Rprintf with a UTF-8 encoded string, and I'm not sure what the right cross-platform usage is. I found an earlier thread about this (http://r.789695.n4.nabble.com/How-to-print-UTF-8-encoded-strings-from-a-C-routine-to-R-s-output-td4724337.html) but it wasn't very helpful. If I want to print a UTF-8 string, I can do one of the
2015 Feb 05
2
Invalid read of size 8
Hi, I have a R program that call a C function. I define a vector of pointer as int nLC=3; int pownLC = nLC*nLC double *MatCovExtra[nT+1]; for(k=0;k<K+1;k++) { MatCovExtra[k] = (double*)R_alloc(pownLC, sizeof(double)); } where nT>K. Then i put some values on the vector associated with the pointer: for(k=0;k<K+1;k++) { for(i=0;i<nLC;i++)
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
Mark II of the patch set. The first patch (dynsumlen2.patch) increments the protocol version to support per-file dynamic block checksum sizes. It is a prerequisite for varsumlen2.patch. varsumlen2.patch implements per-file dynamic block and checksum sizes. The current block size calculation only applies to files between 7MB and 160MB setting the block size to 1/10,0000 of the file length for a
2002 Jun 21
1
small security-related rsync extension
Included below is a shar archive containing two patches that together: 1) make backup files get their setuid and setgid bits stripped by default 2) add a "-s" option that allows backup files to continue to have these privileges This means that if you update a collection of binaries with rsync, and one or more of them has a local-root security problem, the backup file(s) created when
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
Please CC me directly as i'm not on the list. I have attached a patch against latest CVS (cvs diff -u) that adds the following functionality. I can break it up if you would prefer it in pieces. Comments welcome. o add compare-perms option This creates a new inode for a file even if only the perms have changed. This way if a file outside of destdir is hardlinked to a dentry inside
2010 Apr 05
2
Rprintf not updating
Hello all, I am using Rprintf in a C for loop (from .Call) to print a progress indicator showing the current percent complete. The loop I am doing is an time intensive call to another function. I have noticed that Rprintf does not print to the R-window until the entire loop has been completed. When it reaches the end of the loop it suddenly prints 0 percent to 100 percent in a split second.
2003 Jan 03
1
[Fwd: Re: rsync windows -> unix still hanging :(]
Author of the message didn't include rsync@lists.samba.org in the reply, and I think this message is in topic. -------- Original Message -------- Subject: Re: rsync windows -> unix still hanging :( Date: Mon, 30 Dec 2002 17:24:47 -0800 From: Jim Kleckner <jek_subs@kleckner.net> To: Mike Rubel <mrubel@galcit.caltech.edu> CC: cygwin@cygwin.com References:
2009 Feb 08
2
Strange behavior of C compiled program
Hi the list, I need to include some C code in R, but the behavior of the C code is strange : Here is my code : --- 8< --- Rprintf("\n XXXX mTraj=%f mClus=%f",mTraj[i+nbId*c],mClustersCenter[j+nbClusters*c]); Rprintf("\nDistA=%d Tmp=%d",dist,tmp); tmp = mTraj[i+nbId* c] - mClustersCenter [j+nbClusters* c]; Rprintf("\nDistB=%d
2008 Jul 20
1
garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not
Dear list, While trying to identify the root of a problem I am having with garbage collected variables, I have come across the following oddity: depending on whether --verbose is set or not, I obtain different results. I have made a small standalone example to demonstrate it. The example is very artificial, but I had a hard time reproducing reliably the problem. So when I do: (the content of
2005 Apr 02
2
Building new graphic device drivers with g++
Dear Group, I'm trying to build a set of new graphic device drivers. I use the devNull example a a beginning point: $ R CMD SHLIB devNull.c gcc -shared -L/usr/local/lib -o devNull.so devNull.o (everything works OK) $ R CMD SHLIB devNull.cpp g++ -shared -L/usr/local/lib -o devNull.so devNull.o (everything works OK) The difficulties start when trying to compile manually. I compile the
2006 Jun 08
1
Problems Building R-2.3.1 on Alpha server ES40 running Tru64 V5.1B PK#5
R Listers, One of the list contributors suggested I abandon attempts to build R-1.9.1 and focus on building R-2.3.1. I believe the main set of packages have been built properly (with some changes to the code) - however, when building the Recommended packages, the build fails. CODE CHANGES: ============= 1. My C compiler requires a ";" on line 589 of ..../src/main/printutils.c. Here