I am running a code with AMPL. its very heavy model. I am wondering will my code keep running if my Mac is in sleep mode or if I close lid?

my Mac is pro 13 inch 2019.

when I started run the code my Mac made a noise very loud. it is very hot now. when it goes to sleep mode I think it become colder! That's why I am asking

1 Answer 1


In short... No.

It's an either/or.

Either your code is running...
...or your machine is asleep.

You cannot have both at once.

Whatever is running may prevent sleep, or it may not.
You can test for that in Activity Monitor [Applications/Utilities] If you right click any of the headers & add 'Preventing sleep' you'll be able to tell if anything will prevent it or will just allow the machine to sleep at the set time.

enter image description here

  • I am in Utilities (activity monitor)when I right click nothing happens
    – sherek_66
    Jul 30, 2019 at 15:43
  • Launch Activity Monitor, right click any header... picture added
    – Tetsujin
    Jul 30, 2019 at 15:49
  • I did but I don't get these option. Also cpu time in ampl (software that I am running a code) is 1:00:33,96 and cpu% is 99.6, what does it mean?
    – sherek_66
    Jul 30, 2019 at 15:53
  • when I right click a arrow comes down the same as your %CPU
    – sherek_66
    Jul 30, 2019 at 15:55
  • Now I don't know what you mean. Re the CPU %age, that would be an entirely different question, not part of this one.
    – Tetsujin
    Jul 30, 2019 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .