Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: quickly display list of cluster jobs
Posted:
Feb 8, 2013 8:19 AM
|
|
"Rafael " <rafael.fritz@iwes.fraunhofer.de> writes:
> Working on a cluster, I sometimes want to check for the jobs using: > tic, jm=findResource(); toc, > tic, ListJobs=get(jm,'jobs'); toc, > tic, ListJobs, toc, > (Additional tic & toc commands are for evaluation only.) > What I get is a list of jobs, but it seems to take a lot simply to > display that.
Firstly, could I ask which type of cluster you are using? Are you using jobmanager, local, or something else (this has a potentially large effect on the timings - since the jobmanager case, all the information has to be pulled from the remote database; all other cluster types use a collection of files on disk)? Secondly, if you're using R2012a or later, you could use the newer cluster-object based API (starting with 'parcluster' rather than 'findResource'), and I think there are some optimizations in there for certain cases. Finally, could I ask what information you're looking for? There may be ways that you can make a more specific request which could be quicker. For instance, you could find out how many running jobs there are like this:
[pendingJobs, queuedJobs, runningJobs, finishedJobs] = findJob(jm); numRunning = numel(runningJobs)
(See <http://www.mathworks.com/help/distcomp/findjob.html> for more about findJob).
Cheers,
Edric.
|
|
|
|