Difference between revisions of "Smack.m"
| Line 1: | Line 1: | ||
| + | {{DISPLAYTITLE:smack.m}} | ||
Forcibly shuts down the parallel pool and clears the workspace. | Forcibly shuts down the parallel pool and clears the workspace. | ||
| + | |||
==Syntax== | ==Syntax== | ||
Revision as of 17:20, 15 August 2018
Forcibly shuts down the parallel pool and clears the workspace.
Contents
Syntax
smack()
Description
When a Ctrl-C is pressed halfway through a parallel calculation, Matlab would sometimes not terminate the worker processes, and the parallel pool would get stuck until all workers have computed their chunks. A forcible pool shutdown is needed in this case.
Notes
The command is equivalent to the following:
delete(gcp('nocreate')); clear('all');
close('all'); fclose('all');
It exists because Ilya Kuprov got tired one day of repeatedly typing that.
See also
cacheman.m, save_anyway.m, exorcise.m
Version 2.2, authors: Ilya Kuprov