4

My situation
I want to run multiple R scripts on a Ubuntu server with which I connect via SSH. To run multiple R scripts I want to use tmux and one session for each run.

My problem
When I start one R script it should use 4 cores, because I have specified it (one Markov Chain per Core with the Stan library). But when I observe the cores with htop I see, that only one core is working at full capacity and the others are almost idle. When I run the same script outside of the tmux shell, it uses the 4 cores as it should do.

Furthermore, the code stops, when I exit the SSH session, even if I appropriately detach myself from tmux session.

Question: How can I enable multithreading in tmux? If you know other ways of letting code run on the server even if I disconnect, I would also be thankful!

0 Answers0