The whole notebook is one task, but due to Memoryconstrianed the notebook may abort some steps in the middle. As long as this happens, I would like to abort the whole subsequent code, too. Is there any command can do this?

  • $\begingroup$ What about converting your cells to functions and composing your procedure with them instead of evaluating notebook. It will make your life easier $\endgroup$ – Kuba Jan 10 '18 at 20:06
  • $\begingroup$ This question should answer yours: 98882 but as you can see it is rather hairy due to the fact that cells are queued in a process that can be controlled by a user in a very minimal factor. $\endgroup$ – Kuba Jan 10 '18 at 20:11
  • $\begingroup$ I presume you want to abort without quitting the Kernel? (Otherwise, having Quit[] as the last argument of MemoryConstrained would do the trick.) $\endgroup$ – mmeent Jan 11 '18 at 8:10
  • $\begingroup$ @mmeent you are right, quit[] is exactly what I need. but Memoryconstrained can only work on single expr or input each time, I would like to constrain all the programme i.e. the memory of all the evaluation in the whole notebook should constrain within a constant memory number. since each expr may not exceed memory but the sum of them exceeds. is there some command works on MemoryInUse to confine the memory of the evaluation of notebook ? Thanks! $\endgroup$ – Ivy Gao Jan 11 '18 at 18:11

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.