I am running MCMC chains with a self written MCMC algorithm. When I have multiple R terminals open while running the Chain, when it finishes it is not there. when I press ls() it does not show up and when I type the Name it says the Object is not found. I assume It is unrecoverable... but how do I stop it from happening in the future? Thanks Mike -- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4104389.html Sent from the R help mailing list archive at Nabble.com.
Objects disappearing in my R work space
16 messages · Aldo, R. Michael Weylandt, Uwe Ligges +6 more
Can you say more about how your algorithm is implemented? If it's wrapped in a function, the result might disappear with the end of the function's environment. I don't think having multiple R sessions would be a problem...it's never been for me. Michael
On Thu, Nov 24, 2011 at 10:50 AM, Aldo <michael.v.clawson at gmail.com> wrote:
I am running MCMC chains with a self written MCMC algorithm. When I have multiple R terminals open while running the Chain, when it finishes it is not there. when I press ls() it does not show up and when I type the Name it says the Object is not found. I assume It is unrecoverable... but how do I stop it from happening in the future? Thanks Mike -- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4104389.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
It works when I do not have multiple windows open, but is not there when I do have multiple windows open, so I dont think it has to do with the function.... The function is pretty complicated but I can share more if you think it will help -- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4106379.html Sent from the R help mailing list archive at Nabble.com.
Is there a maximum memory allocation for all R windows open? because it is like 1-3 million runs.... so... it may be reaching some sort of memory limit -- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4106390.html Sent from the R help mailing list archive at Nabble.com.
On 25.11.2011 05:07, Aldo wrote:
It works when I do not have multiple windows open,
Please read the posting guide! You failed to follow in multiple way, most important one so far: quote the thread! We do not know your original question nor the answers you got so far. This is the R mailing list that is sometimes misused by Nabble user, unfortunately. Please define "multiple windows". Do you mean graphics devices, R instances, ...?
but is not there when I do have multiple windows open, so I dont think it has to do with the function.... The function is pretty complicated but I can share more if you think it will help
Actually, the posting guide asks you to provide commented, *minimal*, self-contained, reproducible code. Uwe Ligges
-- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4106379.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On 25.11.2011 05:12, Aldo wrote:
Is there a maximum memory allocation for all R windows open? because it is like 1-3 million runs
???? So you mean you open a million windows at the same time? In that case we really need your definition of "window".
.... so... it may be reaching some sort of memory limit
I do not know if any OS / window manager has the capability to open that many numbers of windows. But as I said, we need some difintions and examples. Uwe Ligges
-- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4106390.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111125/5ba1047c/attachment.pl>
On 25.11.2011 16:08, Michael Clawson wrote:
Uwe, by window I mean instances, by runs I mean, runs the my Markov-Chain Monte Carlo simulator I open two instances of R, run a million cycle chain in each instance, and when they finish, neither window has the object I defined to store the runs. I tested this morning and when I open two R windows and run a 5k cycle chain in each instance, neither window has the object I defined to store the runs. This does not happen when I only have one instance of R open
Please: "provide commented, minimal, self-contained, reproducible code." Uwe Ligges
2011/11/25 Uwe Ligges<ligges at statistik.tu-dortmund.de>
On 25.11.2011 05:12, Aldo wrote:
Is there a maximum memory allocation for all R windows open? because it is like 1-3 million runs
???? So you mean you open a million windows at the same time? In that case we really need your definition of "window". .... so... it may be reaching some sort of memory limit
I do not know if any OS / window manager has the capability to open that many numbers of windows. But as I said, we need some difintions and examples. Uwe Ligges --
View this message in context: http://r.789695.n4.nabble.com/** Objects-disappearing-in-my-R-**work-space-tp4104389p4106390.**html<http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4106390.html> Sent from the R help mailing list archive at Nabble.com.
______________________________**________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html<http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
On Nov 25, 2011, at 10:08 AM, Michael Clawson wrote:
Uwe, by window I mean instances, by runs I mean, runs the my Markov-Chain Monte Carlo simulator
It would probably be better to adopt the terminology that the things you are calling "windows" are "sessions".
I open two instances of R, run a million cycle chain in each instance, and when they finish, neither window has the object I defined to store the runs. I tested this morning and when I open two R windows and run a 5k cycle chain in each instance, neither window has the object I defined to store the runs. This does not happen when I only have one instance of R open
The most common cause of that behavior is failing to assign the output of a function to a name. There is an object named ".Last.value" that hosld the results of the last returned object even it it doesn't have another name. lapply(1:10, I) test <- .Last.value test [[1]] [1] 1 [[2]] [1] 2 snipped rest of output But as Uwe said ... without the code, ... and your OS (to answer the question about memory) .... and your sessionInfo() to make sure that this is not a GUI-related issue ... we cannot say very much.
2011/11/25 Uwe Ligges <ligges at statistik.tu-dortmund.de>
On 25.11.2011 05:12, Aldo wrote:
Is there a maximum memory allocation for all R windows open? because it is like 1-3 million runs
???? So you mean you open a million windows at the same time? In that case we really need your definition of "window". .... so... it may be reaching some sort of memory limit
I do not know if any OS / window manager has the capability to open that many numbers of windows. But as I said, we need some difintions and examples. Uwe Ligges --
David Winsemius, MD West Hartford, CT
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111125/479a2045/attachment.pl>
Michael Clawson <michael.v.clawson <at> gmail.com> writes:
My problem with providing the code, is MCMC is a fairly integrated process, so I dont know how I would pare it down to send... Would it work to send the MCMC code, and the three *.csv files to go along with it?
Reproducible is essential, minimal is strongly recommended. The more you can pare down your code, the more likely it is is that someone will actually take the time to take a look at it and see what's going on. Are you using an external program (JAGS, WinBUGS, etc.) or writing to external files that might be getting clobbered by other instances when you have more than one instance running at once?
On 11-11-25 1:03 PM, Michael Clawson wrote:
My problem with providing the code, is MCMC is a fairly integrated process, so I dont know how I would pare it down to send... Would it work to send the MCMC code, and the three *.csv files to go along with it?
I don't understand. If you can't make your code simple enough to post, how do you think we can possibly imagine what you're doing? Duncan Murdoch
On Fri, Nov 25, 2011 at 9:54 AM, David Winsemius<dwinsemius at comcast.net>wrote:
On Nov 25, 2011, at 10:08 AM, Michael Clawson wrote: Uwe,
by window I mean instances, by runs I mean, runs the my Markov-Chain Monte Carlo simulator
It would probably be better to adopt the terminology that the things you are calling "windows" are "sessions".
I open two instances of R, run a million cycle chain in each instance, and when they finish, neither window has the object I defined to store the runs. I tested this morning and when I open two R windows and run a 5k cycle chain in each instance, neither window has the object I defined to store the runs. This does not happen when I only have one instance of R open
The most common cause of that behavior is failing to assign the output of a function to a name. There is an object named ".Last.value" that hosld the results of the last returned object even it it doesn't have another name. lapply(1:10, I) test<- .Last.value test [[1]] [1] 1 [[2]] [1] 2 snipped rest of output But as Uwe said ... without the code, ... and your OS (to answer the question about memory) .... and your sessionInfo() to make sure that this is not a GUI-related issue ... we cannot say very much.
2011/11/25 Uwe Ligges<ligges at statistik.tu-dortmund.**de<ligges at statistik.tu-dortmund.de>
On 25.11.2011 05:12, Aldo wrote: Is there a maximum memory allocation for all R windows open? because it
is like 1-3 million runs
???? So you mean you open a million windows at the same time? In that case we really need your definition of "window". .... so... it may be reaching some sort of memory limit
I do not know if any OS / window manager has the capability to open that many numbers of windows. But as I said, we need some difintions and examples. Uwe Ligges --
David Winsemius, MD West Hartford, CT
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
On 26/11/11 12:19, Duncan Murdoch wrote:
On 11-11-25 1:03 PM, Michael Clawson wrote:
My problem with providing the code, is MCMC is a fairly integrated process, so I dont know how I would pare it down to send... Would it work to send the MCMC code, and the three *.csv files to go along with it?
This *has* to be a fortune!!!:
I don't understand. If you can't make your code simple enough to post, how do you think we can possibly imagine what you're doing?
cheers,
Rolf Turner
One thing is to define "missing" a little better. For example, as mentioned previously, are you returning the values from a function call? If you, print out an indication that they exist at that point. If there is further processing happening, put some checks as to their existance as the code continues. Can you localize where this is happening? If they are "disappearing", then there is something you are doing in your code to most likely make it happen. Until there is something that people can reproduce, there are all types of theories we can expound on. If I was looking at the code, I could probably put checks in at various points to see in what section these things disappeared. Do you have some 'try' functions around parts of the code that might not be reporting some error conditions? So probably until you can provide something that we can at least look at, and exactly how you determined that something disappeared, there is probably not much more we can do at this point. On Fri, Nov 25, 2011 at 6:19 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
On 11-11-25 1:03 PM, Michael Clawson wrote:
My problem with providing the code, is MCMC is a fairly integrated process, so I dont know how I would pare it down to send... Would it work to send the MCMC code, and the three *.csv files to go along with it?
I don't understand. ?If you can't make your code simple enough to post, how do you think we can possibly imagine what you're doing? Duncan Murdoch
On Fri, Nov 25, 2011 at 9:54 AM, David Winsemius<dwinsemius at comcast.net>wrote:
On Nov 25, 2011, at 10:08 AM, Michael Clawson wrote: ?Uwe,
by window I mean instances, by runs I mean, runs the my Markov-Chain Monte Carlo simulator
It would probably be better to adopt the terminology that the things you are calling "windows" are "sessions".
I open two instances of R, run a million cycle chain in each instance, and when they finish, neither window has the object I defined to store the runs. I tested this morning and when I open two R windows and run a 5k cycle chain in each instance, neither window has the object I defined to store the runs. This does not happen when I only have one instance of R open
The most common cause of that behavior is failing to assign the output of a function to a name. There is an object named ".Last.value" that hosld the results of the last returned object even it it doesn't have another name. lapply(1:10, ?I) test<- .Last.value test [[1]] [1] 1 [[2]] [1] 2 snipped rest of output But as Uwe said ... without the code, ... and your OS (to answer the question about memory) ?.... and your sessionInfo() to make sure that this is not a GUI-related issue ... we cannot say very much.
2011/11/25 Uwe Ligges<ligges at statistik.tu-dortmund.**de<ligges at statistik.tu-dortmund.de>
On 25.11.2011 05:12, Aldo wrote: ?Is there a maximum memory allocation for all R windows open? because it
is like 1-3 million runs
???? So you mean you open a million windows at the same time? In that case we really need your definition of "window". .... so... it may be reaching some sort of memory limit
I do not know if any OS / window manager has the capability to open that many numbers of windows. But as I said, we need some difintions and examples. Uwe Ligges --
David Winsemius, MD West Hartford, CT
? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111125/32eac144/attachment.pl>
at least put print(str(Samples)) right after the function call to make sure it is there, and if you have more code after that, sprinkle that print statement in the following code. You might at least send the code and indicate where you have tested to see if the object is still there. So put some of those print statements to help isolate what section of code the problem is happening in because just saying it disappears is not sufficient. This is elementary debugging of a program. If your program is as big and complicated as you say, then you have to start learning some debugging techniques to help you find where the problem is. On Fri, Nov 25, 2011 at 7:48 PM, Michael Clawson
<michael.v.clawson at gmail.com> wrote:
I am returning a matrix from a function Samples<-DoMCMC(InitialVactor, CovarianceMatrix, ObservationData, NumCycles, Burnin, Thin) When I have one R session open the program works, Samples is a matrix of samples from the MCMC When I have two R sessions open, it runs to completion, but when I got to view Samples, it is not there. by?disappear, I mean I define Samples as above, and when it finishes cycling through I type Samples and it says it?doesn't?exist, I type the command: ls() and it is not in the list of objects defined in the session. How would something I am doing in the code be affected by how many R sessions are open? I have tried this on two different machines, one running Windows XP and one Windows 7. but both running R 2.13.1 Thank you all for all of the responses, sorry if my inexperience in R is hindering this process On Fri, Nov 25, 2011 at 4:06 PM, jim holtman <jholtman at gmail.com> wrote:
One thing is to define "missing" a little better. ?For example, as mentioned previously, are you returning the values from a function call? ?If you, print out an indication that they exist at that point. If there is further processing happening, put some checks as to their existance as the code continues. ?Can you localize where this is happening? ?If they are "disappearing", then there is something you are doing in your code to most likely make it happen. ?Until there is something that people can reproduce, there are all types of theories we can expound on. If I was looking at the code, I could probably put checks in at various points to see in what section these things disappeared. ?Do you have some 'try' functions around parts of the code that might not be reporting some error conditions? ?So probably until you can provide something that we can at least look at, and exactly how you determined that something disappeared, there is probably not much more we can do at this point. On Fri, Nov 25, 2011 at 6:19 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
On 11-11-25 1:03 PM, Michael Clawson wrote:
My problem with providing the code, is MCMC is a fairly integrated process, so I dont know how I would pare it down to send... Would it work to send the MCMC code, and the three *.csv files to go along with it?
I don't understand. ?If you can't make your code simple enough to post, how do you think we can possibly imagine what you're doing? Duncan Murdoch
On Fri, Nov 25, 2011 at 9:54 AM, David Winsemius<dwinsemius at comcast.net>wrote:
On Nov 25, 2011, at 10:08 AM, Michael Clawson wrote: ?Uwe,
by window I mean instances, by runs I mean, runs the my Markov-Chain Monte Carlo simulator
It would probably be better to adopt the terminology that the things you are calling "windows" are "sessions".
I open two instances of R, run a million cycle chain in each instance, and when they finish, neither window has the object I defined to store the runs. I tested this morning and when I open two R windows and run a 5k cycle chain in each instance, neither window has the object I defined to store the runs. This does not happen when I only have one instance of R open
The most common cause of that behavior is failing to assign the output of a function to a name. There is an object named ".Last.value" that hosld the results of the last returned object even it it doesn't have another name. lapply(1:10, ?I) test<- .Last.value test [[1]] [1] 1 [[2]] [1] 2 snipped rest of output But as Uwe said ... without the code, ... and your OS (to answer the question about memory) ?.... and your sessionInfo() to make sure that this is not a GUI-related issue ... we cannot say very much.
2011/11/25 Uwe Ligges<ligges at statistik.tu-dortmund.**de<ligges at statistik.tu-dortmund.de>
On 25.11.2011 05:12, Aldo wrote: ?Is there a maximum memory allocation for all R windows open? because it
is like 1-3 million runs
???? So you mean you open a million windows at the same time? In that case we really need your definition of "window". .... so... it may be reaching some sort of memory limit
I do not know if any OS / window manager has the capability to open that many numbers of windows. But as I said, we need some difintions and examples. Uwe Ligges --
David Winsemius, MD West Hartford, CT
? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
-- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.
Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.