stata_kernel icon indicating copy to clipboard operation
stata_kernel copied to clipboard

Multiple stata kernels running together

Open shikharsingla opened this issue 5 years ago • 8 comments

Is your feature request related to a problem? Please describe. If I run two do files together either from atom or one from atom and other from jupyter-notebook both stop running due to error since they both are accessing the same stata console on linux (I believe).

Describe the solution you'd like Either stop the kernal from running the second do file if one is running already or create a new kernel. I am not sure if it is possible or not.

shikharsingla avatar Dec 24 '19 17:12 shikharsingla

It should be possible to do this on Linux: image

These two sessions are running on the same Linux machine but are independent.

kylebarron avatar Dec 24 '19 23:12 kylebarron

When I use stata_kernel from Jupyter or Atom, they seem to be running on same session and both codes stop running. Am i doing something wrong there?

shikharsingla avatar Dec 25 '19 00:12 shikharsingla

Are you able to do the test I did above? Set a local in one and see if it works in the other session?

kylebarron avatar Dec 25 '19 00:12 kylebarron

You also need to make sure you're creating a new session, not reusing the old one in Hydrogen. Look for a command like "Start new local session" in Hydrogen.

kylebarron avatar Dec 25 '19 00:12 kylebarron

okay thanks, I will give it a try!

shikharsingla avatar Dec 25 '19 00:12 shikharsingla

I tried and open stata console in two different terminal windows. They seem to be independent but somehow in atom or jupyter notebook code stops running due to some error if I open another jupyter-notebook and run some code there. I am a bit confused.

shikharsingla avatar Dec 26 '19 16:12 shikharsingla

Is there an error message in the terminal you opened jupyter from?

kylebarron avatar Dec 26 '19 16:12 kylebarron

Yes, I so started two different jupyter-notebooks. I ran a code of around 150 lines in one and then ran the same code in the second one while the first one was still running. Second one produced destring n variable n not found for the same code. Same code in the first one ran without any errors. In fact, there is nothing called destring n in my do file. Everytime, it says some random variable is not found which is not even there in the do file. Thanks for your help.

shikharsingla avatar Dec 26 '19 17:12 shikharsingla