2
$\begingroup$

I'm running a Mathematica code on a remote computer in parallel, by using nohupcommand. It seems that there is a problem in the code and I need to stop it. Since it is working in background, Ctrl+c is not working to terminate it. using top command, I found PID for the 16 cores that I am using, but Kill PID doesn't stop the MathematicaKernel. Is there anything else I can do?

Edit: According to rakuo15's answer at https://superuser.com/questions/161531/how-to-kill-all-processes-in-linux , I forced every process to stop by using killall5 -9. It stopped the MathematicaKernel plus everything else. If there is a better way, it would be great to know.

$\endgroup$
  • $\begingroup$ Does kill -9 PID work? Be aware that it might crash your main kernel as well if communication is unexpectedly killed. $\endgroup$ – halirutan Jan 20 '18 at 19:07
  • $\begingroup$ no I also tried that. but the cpu was still working for the MathematicaKernel. Actually I noticed if I kill PID, that special PID is killed, but replaced with another PID and the number of running cores is not changed. $\endgroup$ – n gh Jan 21 '18 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.