I need to cancel a parallel processing simulation that I started on a Linux server using R.
Last night I connected to the server using ssh and started the simulation from the shell with the nohup command: nohup R CMD BATCH mysimulation.R
The mysimulation.R file uses the mclapply command in the multicore package to spawn additional instances of R to run the simulation in parallel. For instance, when I run top in the shell I see ten different instances of R running, then finishing a run of the simulation, then starting again to continue with the additional simulation replications.
I have almost no experience working directly with a Linux server (the extent of my knowledge is cd, ls, and the nohup command mentioned above). I searched around a bit for a solution and thought killing the process might work. I tried:
kill -9 mypid (which said it killed the process).
However, the simulation continues to run. I can see the instances of R continuing to run, close, and respawn. Can anyone point me to resources or walk me through the specific steps I need to take to shut down this simulation? Thanks.