How to Create Multi Dependent Tasks in HPC

คำถาม How to Create Multi Dependent Tasks in HPC

  • 13 Juli 2011 7:26
     
     

    hi,

    my code basically  look like this:

    ISchedulerTask task1 = job.CreateTask();  

     
    task1.CommandLine = cmdparams1;  
     
    task1.Name = "First Task";  
     
    job.AddTask(task1);  
     
     
     
     
     
    ISchedulerTask task2 = job.CreateTask();  
     
    task2.CommandLine = cmdparams2;  
     
    IStringCollection earlierTasks = new StringCollection(); // Create a string collection with a list of earlier tasks  
     
    earlierTasks.Add("First Task"); // Add the name of the tasks to depend on  
     
    task2.DependsOn = earlierTasks; // Set the DependsOn field for task2  
     
     
    job.AddTask(task2);  
     

    i get an error if my string colection contain more than 75 tasks that i want to run parallely and have the final task depand on them all and run only if all the tasks finished successfully.

    the error i get is :

    "the value for "depends on" is too large for the database. the size should be smaller than 320"

    is there a way to configure it in some way or is it a known limitation?

    thanks in advanced,

    ben

    this

Semua Balasan

  • 15 Juli 2011 12:26
     
     

    Dear Ben,

    Do you have more than 75 task all with different task names before the next task?

    I also had this problem with my job but in my case I simplified the name of all tasks for example 'task group 1', 'task group 2' and added in the StringCollection of DependsOn only once the task group name.