hostname=char(java.net.InetAddress.getLocalHost.getHostName);
while (1),
  ijs=sscanf(char(JobQClient.ping('s64 svm_allpairs  next')),'%i');
  
  i=ijs(1); j=ijs(2);

  
  % DO JOB based on i,j .....
  
  
  tempfn=sprintf('/work/nhz/101_ObjectCategories/output_temp/w_y_pr_oct14_%d_%d_%s.mat',ci_0, ci_1,hostname);
  permfn=sprintf('/work/nhz/101_ObjectCategories/output_oct14/w_y_pr_oct14_%d_%d.mat',ci_0, ci_1);
  save(tempfn,'w','y_pr','marg','er');

  JobQClient.ping(sprintf('s64 svm_allpairs wrote %d %d %s %s',ci_0,ci_1,tempfn,permfn));
end

% /usr/local/j2sdk1.4.2_07/bin/java -cp /home/eecs/nhz/jobq_v2/ JobQClient s64 svm_allpairs alloc 101 101;  nohup gexec -n 50 -p host /usr/sww/pkg/matlab-7.1/bin/matlab -nodisplay -nosplash < /work/nhz/101_ObjectCategories/mrun_svm_allpairs.m >& log_svm_allpairs_oct12 &
