locked
ISchedulerTask.Output property never set RRS feed

  • Question

  • Having submitted a task (with a command of "ECHO Test") and waited for the state to be Finished, the ISchedulerTask.Output property only ever returns an empty string

     

    Andy

    Monday, April 14, 2008 12:12 PM

Answers

  •  

    Andy,

    Since Task View also doesn't show any output, this is probably not an API issue.

     

    Are you setting the StdOut on your task?  If so, no output will be stored in the database; output will just go to the stdout file.

     

    If that isn't the answer, consider posting some of your code so we can take a look.

     

    Thanks,
    Josh

     

    P.S. Build 1252 is the March CTP release

    Tuesday, April 15, 2008 4:51 PM
    Moderator

All replies

  •  

    Thanks for the bug report; I've filed a bug internally with Dev and we'll look into it.

    -J

    Monday, April 14, 2008 9:00 PM
    Moderator
  • Hi,

    I'm a developer on the Scheduler for HPC.  If you could answer a couple questions that would be a great help.

     

    * What version of the product are you using?  Beta One or CTP?

    * Did you call Refresh() after the Task ran? 

    * If you issue a "TASK VIEW <jobid.taskid>" at the command line, does it show the output?

     

    Thanks,

    -g

    Monday, April 14, 2008 9:24 PM
  • Hi,

     

    I just gave this a try and the code below is working.  Note that I ran the code after the job/task completed.

     

    private void ViewTask(List<string> args)

    {

        Scheduler scheduler = new Scheduler();

        scheduler.Connect(_owner._ServerName.Value);

        string[] parts = args[0].Split('.');

        if (parts.Length == 2)

        {

            ISchedulerJob job = scheduler.OpenJob(int.Parse(parts[0]));

            ISchedulerTask task = job.OpenTask(new TaskId(int.Parse(parts[1])));

            Console.WriteLine("State: {0}", task.State.ToString());

            Console.WriteLine("Output: {0}", task.Output);

        }

    }

     

    Monday, April 14, 2008 9:48 PM
  •  BackstageLane wrote:

    * What version of the product are you using?  Beta One or CTP?

     

    TBH I'm not sure any more as I had to roll back my April version as it didn't include the Store assembly and the assemblies don't include useful version information Sad

     

    How can I tell?

     

    FWIW: I'm using the Compute Cluster Admin Console version 2.0.1252.0 and get the same problem there if I create a task and view the output.

     

     BackstageLane wrote:

    * Did you call Refresh() after the Task ran? 

    Yes

     

     BackstageLane wrote:

    * If you issue a "TASK VIEW " at the command line, does it show the output?

     

    No Sad

     

    Code Snippet

    C:\Users\Administrator>task view 132.1
    Task ID                         : 132.1
    State                           : Finished
    Name                            : Test task
    CommandLine                     : set
    RequiredNodes                   :
    ResourceRequest                 : 1-1 processors
    AllocatedNodes                  : HPC2008HN1
    ExitCode                        : 0
    ErrorMessage                    :
    Output                          :
    SubmitTime                      : 15/04/2008 17:17:15
    StartTime                       : 15/04/2008 17:17:15
    EndTime                         : 15/04/2008 17:17:15
    Elapsed time                    : 00:00:00:00
    TotalKernelTime                 : 0
    TotalUserTime                   : 0
    Working Set                     : 1872 KB
    IsParametric                    : False
    StartValue                      :
    EndValue                        :
    IncrementValue                  :

     

     

    Tuesday, April 15, 2008 4:36 PM
  •  

    Andy,

    Since Task View also doesn't show any output, this is probably not an API issue.

     

    Are you setting the StdOut on your task?  If so, no output will be stored in the database; output will just go to the stdout file.

     

    If that isn't the answer, consider posting some of your code so we can take a look.

     

    Thanks,
    Josh

     

    P.S. Build 1252 is the March CTP release

    Tuesday, April 15, 2008 4:51 PM
    Moderator
  •  Barndawgie wrote:

    Are you setting the StdOut on your task?  If so, no output will be stored in the database; output will just go to the stdout file.

     

    D'oh I messed the memo which said  setting the output file will stop the output being stored in the database

     

    Thanks

     

    Andy

    Tuesday, April 15, 2008 4:57 PM
  • Sorry about that!  I've filed a bug for us to update the documentation to include that.

     

    Thanks for the feedback!

    -Josh

    Wednesday, April 16, 2008 8:28 PM
    Moderator