function makeJobs0504b

caFactor = 0.9;
class  = 'long';
binary = 'psg-release.0503.LOW';
problemFrom = 1;
problemTo = 11;

%%%Description file
fid = fopen('describeJobs0504b.txt', 'wb');
fprintf(fid, 'type\tdeltaRule\tcomb\tN\tdelta\tuid\n');

%%% Sequential jobs

ratioYn = 0.001;
ratioXY = 0.000;
gamma = optGamma();
egl = optEGL();
cpu = optCPU(1800);

problems = optIscasComb(ratioXY*ratioYn, ratioYn, problemFrom, problemTo);
nProblems = length(problems);
% function [out,delta] = optNodes2(deltaRatio, to, from, step, maxNodes, maxPerNode)
nodeFrom = 1;
nodeTo   = 1;
nodeStep = 1;
nodes = optNodes2(0.0, nodeTo, nodeFrom, nodeStep);
nNodes = length(nodes);

for p = 1:nProblems
  if (p==3 || p==5)
    continue
  end
  for n = 1:nNodes
    ca = optStopCA_scalability(p+problemFrom-1, caFactor);

    myN = prod([ str2double(nodes{n}(1).value) str2double(nodes{n}(2).value) ]);
    delta = str2double(nodes{n}(3).value);
    uid = sprintf('comb%02g_N%02g_D%02g', p+problemFrom-1, myN, delta);

    options = [  problems{p} nodes{n} gamma{1} egl{1} cpu{1} ca{1} ];
    writeJob2(uid, class, binary, options);
    fprintf(fid, 'seq\tstatic0\t%g\t%g\t%g\t%s\n', p+problemFrom-1, myN, delta,uid );
  end
end




%%% Parallel jobs
ratioYn = 0.107;
ratioXY = 0.590;
cpu = optCPU(1800);

problems = optIscasComb(ratioXY*ratioYn, ratioYn, problemFrom, problemTo);
nProblems = length(problems);

nodeFrom = 2;
nodeTo   = 24;
nodeStep = 1;


%%% delta = 1
deltaRatio = -1;
nodes = optNodes2(deltaRatio, nodeTo, nodeFrom, nodeStep);
nNodes = length(nodes);

for p = 1:nProblems
  if (p==3 || p==5)
    continue
  end
  for n = 1:nNodes
    ca = optStopCA_scalability(p+problemFrom-1, caFactor);

    myN = prod([ str2double(nodes{n}(1).value) str2double(nodes{n}(2).value) ]);
    delta = str2double(nodes{n}(3).value);
    uid = sprintf('comb%02g_N%02g_D%02g', p+problemFrom-1, myN, delta);

    options = [  problems{p} nodes{n} cpu{1} ca{1} ];
    writeJob2(uid, class, binary, options);
    fprintf(fid, 'par\tstatic1\t%g\t%g\t%g\t%s\n', p+problemFrom-1, myN, delta,uid );
  end
end


%%% delta = 2
deltaRatio = -2;
nodes = optNodes2(deltaRatio, nodeTo, nodeFrom, nodeStep);
nNodes = length(nodes);

for p = 1:nProblems
  if (p==3 || p==5)
    continue
  end
  for n = 1:nNodes
    ca = optStopCA_scalability(p+problemFrom-1, caFactor);

    myN = prod([ str2double(nodes{n}(1).value) str2double(nodes{n}(2).value) ]);
    delta = str2double(nodes{n}(3).value);
    uid = sprintf('comb%02g_N%02g_D%02g', p+problemFrom-1, myN, delta);

    options = [  problems{p} nodes{n} cpu{1} ca{1} ];
    writeJob2(uid, class, binary, options);
    fprintf(fid, 'par\tstatic2\t%g\t%g\t%g\t%s\n', p+problemFrom-1, myN, delta,uid );
  end
end


%%% delta = p/2
deltaRatio = 0.5;
nodes = optNodes2(deltaRatio, nodeTo, nodeFrom, nodeStep);
nNodes = length(nodes);

for p = 1:nProblems
  if (p==3 || p==5)
    continue
  end
  for n = 1:nNodes
    ca = optStopCA_scalability(p+problemFrom-1, caFactor);

    myN = prod([ str2double(nodes{n}(1).value) str2double(nodes{n}(2).value) ]);
    delta = str2double(nodes{n}(3).value);
    uid = sprintf('comb%02g_N%02g_D%02g', p+problemFrom-1, myN, delta);

    options = [  problems{p} nodes{n} cpu{1} ca{1} ];
    writeJob2(uid, class, binary, options);
    fprintf(fid, 'par\tp/2\t%g\t%g\t%g\t%s\n', p+problemFrom-1, myN, delta,uid );
  end
end


%%% delta = p-1
deltaRatio = 1.0;
nodes = optNodes2(deltaRatio, nodeTo, nodeFrom, nodeStep);
nNodes = length(nodes);

for p = 1:nProblems
  if (p==3 || p==5)
    continue
  end
  for n = 1:nNodes
    ca = optStopCA_scalability(p+problemFrom-1, caFactor);

    myN = prod([ str2double(nodes{n}(1).value) str2double(nodes{n}(2).value) ]);
    delta = str2double(nodes{n}(3).value);
    uid = sprintf('comb%02g_N%02g_D%02g', p+problemFrom-1, myN, delta);

    options = [  problems{p} nodes{n} cpu{1} ca{1} ];
    writeJob2(uid, class, binary, options);
    fprintf(fid, 'par\tp-1\t%g\t%g\t%g\t%s\n', p+problemFrom-1, myN, delta,uid );
  end
end

%%% Clean up
fclose(fid);

end
