How to Create Multi Dependent Task Groups in HPC

Answered How to Create Multi Dependent Task Groups in HPC

  • 13 июля 2011 г. 7:36
     
     

    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

Все ответы

  • 18 июля 2011 г. 5:36
     
     
    Can your 75 tasks that are being depended on be grouped as a parametric sweep task?
  • 18 июля 2011 г. 6:28
     
     Отвечено

    There is a similar thread in this forum, I just copy the answer here:

    Yes, you've hit a known limitation in task dependencies for the version V2 of HPC Server. i.e. The list of task names in the DependsOn value cannot be longer than 320 chars. This is fixed in the latest V3 Beta1. For V2, there are a couple of possible of workarounds:

    (i) The dependencies created via the GUI (HpcCLusterManager) do not have this limitation because it ues groups of tasks, rather than task names. Therefore, you can use the GUI to create the dependencies. If you need to re-use this set of tasks and dependencies, you could export the job to XML and then re-import it when you need it.

    -or-

    (ii) When you need to make a task dependent on a large set of tasks, then you can give each of the tasks in the large set the same task name. The value of DependsOn will then just be a single task name, and this will make the task dependent on all tasks with that name.


    Qiufang Shi
    • Помечено в качестве ответа Ben.Alterzon 21 июля 2011 г. 10:53
    •  
  • 21 июля 2011 г. 10:53
     
     

    no, they can't,

    every task get a diffrent command line.

    thanks

    ben

  • 21 июля 2011 г. 10:53
     
     

    great thanks

    ben