I’m setting up Matlab and have a question about start up. As soon as I press “Launch MATLAB” after a successful job start, I get connected to TurboVNC. It takes another minute or so for Matlab to start. I am wondering if there is a way to wait for MATLAB to fully start before “Launch MATLAB” option is available. What is a common approach to this problem?
Yea I don’t know if there’s a lot we can do about that. The mechanism to write the connection file (where it turns the job from Starting to Running) is not really in the users control.
I will also add that in the various deployments I have done and have seen, a simple disclaimer saying matlab takes a sec to load is all that is ever done.
You could try to add a sleep 3 or something similar in after.sh.erb. If you look at job_script_content.sh you’ll see the execution flow. after.sh.erb is invoked after the script, but before it creates the yml that will show the connect button. So I think this is the spot to wait/sleep/verify before moving on.
And to add more to that answer: the after.sh.erb blocks execution. So if you sleep in it, it will actually halt the entire script and then after the after.sh.erb script completes will it write the connection.yml which will turn your card from starting to running.