Hi @lawrence-bird
you can open waitonlock.m
and make any tweaks there. The important part is this:
%prepare command if the job is not running on the local machine
if ~strcmpi(oshostname(),cluster.name),
if isa(cluster,'cloud'),
command = [' [ -f ' lockfilename ' ] && [ -f ' logfilename ' ] 2>/dev/null'];
command = [starcluster() ' sshmaster ' cluster.name ' --user ' cluster.login ' ''' command ''''];
else
command = ['ssh -l ' cluster.login];
if isprop(cluster,'idfile') && ~strcmp(cluster.idfile,''),
command = [command ' -i ' cluster.idfile];
end
if isprop(cluster,'port') && cluster.port,
command = [command ' -p ' num2str(cluster.port) ' localhost'];
else,
command = [command ' ' cluster.name];
end
command = [command ' "[ -f ' lockfilename ' ] && [ -f ' logfilename ' ]" 2>/dev/null'];
end
end
This is where we prepare the bash command to check for job completion. You will get something like:
ssh -l blabla clustername "[-f modelname.lock ] && [ -f modelname.outlog ]" 2>/dev/null
you can try running this command on your terminal to see if it times out. In short, it is logging into the cluster and checking whether the lock file (and outlog file) are there. Feel free to change anything you want. Another thing you can try is changing pause(5);
further down, so that it checks less frequently. In any case, you will need your VPN to work so that this ssh command works, otherwise there is no way to check whether the run is finished.
All the best
Mathieu