search for: test_iter

Displaying 5 results from an estimated 5 matches for "test_iter".

Did you mean: next_iter
2017 Jun 11
1
Memory leak in nleqslv()
...t;- x[1:rows_x] x_2 <- x[(rows_x+1):(rows_x*2)] eq1<- x_1-100 eq2<-x_2*10-40 return(c(eq1,eq2)) } model_test <- function() { reserves<-(c(0:200)/200)^(2)*2000 lambda <- numeric(NROW(reserves))+5 res_ext <- pmin((reserves*.5),5) x_test <- c(res_ext,lambda) #print(x_test) for(test_iter in c(1:1000)) nleqslv(x_test,cons_ext_test,jacobian=NULL) i<- sort( sapply(ls(),function(x){object.size(get(x))})) print(i[(NROW(i)-5):NROW(i)]) } model_test() When I run this over 1000 iterations, memory use ramps up to over 2.4 GB While running it with 10 iterations uses far less memory,...
2017 Jun 12
2
Possible with enableJIT function
...ge with the following small example. <code> library(nleqslv,lib.loc="../nleqslv.Rcheck") library(pryr) dslnex <- function(x) { y <- numeric(2) y[1] <- x[1]^2 + x[2]^2 - 2 y[2] <- exp(x[1]-1) + x[2]^3 - 2 y } xstart <- c(x1=1.5,x2=2) nsims <- 10 for(test_iter in seq_len(nsims)){ z <- nleqslv(xstart,dslnex,jacobian=NULL) print(paste("nleqslv iteration",test_iter,"and memory used is",mem_used())) } memory.profile() gc() print(paste("At end memory used is", mem_used())) </code> The final output is <output...
2017 Jun 13
0
Possible with enableJIT function
...> library(nleqslv,lib.loc="../nleqslv.Rcheck") > library(pryr) > dslnex <- function(x) { > y <- numeric(2) > y[1] <- x[1]^2 + x[2]^2 - 2 > y[2] <- exp(x[1]-1) + x[2]^3 - 2 > y > } > xstart <- c(x1=1.5,x2=2) > nsims <- 10 > for(test_iter in seq_len(nsims)){ > z <- nleqslv(xstart,dslnex,jacobian=NULL) > print(paste("nleqslv iteration",test_iter,"and memory used is",mem_used())) > } > memory.profile() > gc() > print(paste("At end memory used is", mem_used())) > </code>...
2006 Jun 06
14
How can I set the session in a functional test?
Hey :) I need to simulate a login in my functional test, otherwise I can''t GET nor POST to the action. I need to set the session key "logged_in_user_id". I tried this inside the setup() method: session[''logged_in_user_id''] = 1 But that throws: TypeError: can''t convert String into Integer Any ideas? Thanks, Rob -------------- next part
2010 May 17
3
Writing a properly-formed custom type (configxml)
Please hold my hand. After studying the wiki, several unofficial pages, various mailing list entries, and the operation of the "iptables" type as found on the net, I have created a custom type, lovingly named ``configxml''''. It updates attributes on the first element matching a supplied XPath in a given XML file. The first use case is configuring Atlassian JIRA to use