similar to: Saving memory usage -- .C(....., DUP = FALSE) danger?

Displaying 20 results from an estimated 5000 matches similar to: "Saving memory usage -- .C(....., DUP = FALSE) danger?"

2008 Nov 06
3
.C(..., DUP=FALSE) memory costs depending on input size?
Hello, I'm trying to create my own C code for use within R. While optimizing the code I've noticed that even while only using pointers to get my data to C the time needed still depends on data (vector) size. To test this, I've created an empty C function to which I've send vectors containing various sizes of elements. The time needed for each call is measured and plotted. I would
2005 Aug 08
1
modifying argument of a .C call (DUP=FALSE)
I have a huge matrix on which I need to do a simple (elementwise) transformation. Two of these matrices cannot fit in the memory, so I cannot do this in R. I thought of writing some C code to do this and calling it using .C with DUP=FALSE. All I need is a simple for loop that replaces elements with their new value, something like void transform(double *a, int *lengtha) { int i; for (i=0;
1999 Jan 22
1
two questions
A non-text attachment was scrubbed... Name: not available Type: text Size: 722 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/19990122/cea14ffd/attachment.pl
2009 Aug 19
1
[PATCH] Correct checks for dup failure in guestfs_launch
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw -------------- next part -------------- >From 8f1b06f64807239d4b4c923af4db8626a866ff6f Mon Sep 17
2001 Mar 22
1
lazy evaluation and DUP=F
I am having some difficulty understanding the implication of lazy evaluation mixed with DUP=F in a .Fortran call. In qr.qty from base DUP is not used as an argument so defaults to T. I am calling qr.qty with a very large array and would like to set DUP=F in the .Fortran call so that qr.qty would be defined as copied below. Is there some risk that a variable used as the argument in the original
2015 Jun 01
2
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
I'm observing that base::sum(x, na.rm=FALSE) for typeof(x) == "double" is much more time consuming when there are missing values versus when there are not. I'm observing this on both Window and Linux, but it's quite surprising to me. Currently, my main suspect is settings in on how R was built. The second suspect is my brain. I hope that someone can clarify the below
2000 Sep 07
1
.C and DUP=TRUE versus .Call
Hi Everyone, I have a piece of C code that uses R_alloc, and so I set DUP=TRUE in the call using ".C". As I understand it this takes a copy of each object passed to my function. If these objects are large then this could be expensive. My question is, if I rewrote the code to use .Call, would I avoid this duplication by using the objects themselves (they are not modified in the code)
2017 Oct 09
5
Why dup()?
Hello all, My scripts, which read stdout from ssh, weren't seeing EOF from the remote session.? It was being sent, but lost.? I tracked it down to the following code, in ssh.c, at ssh_session2_open: ??????? if (stdin_null_flag) { ??????????????? in = open(_PATH_DEVNULL, O_RDONLY); ??????? } else { ??????????????? in = dup(STDIN_FILENO); ??????? } ??????? out = dup(STDOUT_FILENO);
2001 Nov 06
4
Failed to dup/close : The descriptor is a file, not a socket
I am getting this error on a Win98SE pc, but not on WinNT4 or Linux Redhat 7.1 or 7.2. Failed to dup/close : The descriptor is a file, not a socket The command I used was rsync -e ssh gas.exe 10.105.50.180:src/ It works like I said on NT4 and from my Linux pc. I have cygwin installed on the win98 and NT. Rsync is version 2.4.6 Is it just because Win9x SU**s? Also where can I get a list of
2011 Nov 02
1
can one modify array in R memory from C++ without copying it?
Hi, guys. I posted this by accident at rcpp-dev, although it meant to be only to r-dev, so don't flame me here please, rcpp guys will do it there, i am sure :). I have some pretty large arrays in R and i wanted to do some time consuming modifications of these arrays in C++ without actually copying them, just by passing pointers to them. Since i don't know internal data structures of R, i
2006 Aug 08
2
win32 eventlog dup
That''s weird. Line 296 is just a call to FormatMessage(). Folks on the mailing list - could this be a wide character issue? Buffer too small maybe? Regards, Dan Pe?a wrote: > forgot: > > it segfaults on the win2k3 server (domain controller). > > it has _not_ segfault on my winxp pro though. > > > > # -----Original Message----- > # From: Pe?a, Botp
2014 Jun 19
1
[PATCH] nouveau: dup fd before passing it to device
nouveau screens are reused for the same device node. However in the scenario where we create screen 1, screen 2, and then delete screen 1, the surrounding code might also close the original device node. To protect against this, dup the fd and use the dup'd fd in the nouveau_device. Also tell the nouveau_device that it is the owner of the fd so that it will be closed on destruction. Also make
2017 Oct 20
3
Why dup()?
I've been using ssh without it duping stdout and stderr, and had no problems.? I think this change should be made to the master source. WHAT IS THE PROBLEM WITH SSH RIGHT NOW? It duplicates FILENO_STDOUT and FILENO_STDERR, thus there are two descriptors for each of these files.? When the remote program closes its stdout or stderr, the remote sshd sends the appropriate message to the local
2009 Jul 20
2
Hitting unknown error with "can't dup NilClass"
Hi, My system has been encounter this problem, and I couldn''t find solution after debugging. My scenario is stated below: class user has_many :posts has_many :comments end class post belongs_to :user has_many :comments, :as => :commentable end class comment belongs_to :post belongs_to :user end For this case, I am trying to retrieve each post''s comment
2017 Oct 13
2
Why dup()?
On 13/10/17 16:22, Damien Miller wrote: > At a minimum, I think we'd have to dup2 a fd to /dev/null to > STDOUT_FILENO so writes to stdout (e.g. from ill-behaved > libraries) have somewhere to go. Would that really be useful?? Output from Ill-behaved libraries, written fd 1, already go to the same place.? Don't forget, dup does not create a new file, it creates a duplicate
2012 May 21
2
Error : can't dup NilClass, in Heroku
Hi, The application is deployed on Heroku, is based on Ruby 3.2.1 and Rails 1.9.2. Sometimes a function of my props starts throwing this error " StringUtils:dateTimeFromString, str , *can''t dup NilClass*" and I don''t understand the cause. it''s my function: require ''time'' module StringUtils
2006 Mar 13
2
panic: ffs_valloc: dup alloc
I get the above panic after nfs clients attach to this nfs server and being read/write ops on it after an unclean shutdown. I've fsck'ed the fs, and it marks it as clean, but I get this every time. It's an NFS share of a GEOM stripe (about 2TB). mode = 0100600, inum = 58456203, fs = /mnt panic: ffs_valloc: dup alloc I do have dumps from two crashes so far. This is
2009 Jun 15
4
applying a patch (select-dup.diff) to wine to fix TF2
I really feel like a n00b posting this, but I can't for the life of me find how to apply this patch. http://bugs.winehq.org/attachment.cgi?id=21763&action=edit One of the Steam updates broke TF2, and according to the comments in the bug tracker this should fix it. I just have idea what to do with the file. Also, my wine setup isn't like most peoples. I compile wine from source and
2017 Oct 13
4
Why dup()?
On 12/10/17 12:54, Clark Wang wrote: > How did you hit the problem? "ssh host echo hello | cat" works fine > for me. That's because ssh exited, not because of EOF. Consider the following: ?? ssh localhost 'exec cat > /dev/null' | { read l; echo ${l:-EOF}; } One should see "EOF" immediately (for values of immediate that include startup latency), but
2010 Jul 31
4
Exception: can't dup Symbol
Hey everybody, I''m trying to test a little piece of code I wrote, and I get the following error: Exception: can''t dup Symbol It happens in the following line: try_to_login @valid_user, :remember_me => "1", where the function try_to_login is: def try_to_login(user, options = {}) user_hash = {:screen_name => user.screen_name, :password => user.password}