How do you get "finished" result back from HPC using C#
-
2. května 2012 19:55
I have used CCP_JOBID, etc, to get information from the cluster to use in a script I am writing, but I don't see a way to get the "JobState" out via code in C#. Any ideas on how I can get the results? I would like to have a loop that checks the job state every so often. Once it gives back the "finished" state I will push the progress bar up to 100%.
Thank you for your assistance!
Všechny reakce
-
3. května 2012 16:53
Hi,
ISchedulerJob.State property can be used to obtain information about job's current state: http://msdn.microsoft.com/en-us/library/microsoft.hpc.scheduler.ischedulerjob.state(v=vs.85).aspx
When looping to check the state please keep in mind, that you have to call ISchedulerJob.Refresh() method after each iteration: http://msdn.microsoft.com/en-us/library/microsoft.hpc.scheduler.ischedulerjob.refresh(v=vs.85).aspx
Regards,
Łukasz -
3. května 2012 18:16
I'm not sure how to implement this into my code. I have never used the get method before. Would it be possible for you to show an example of how to set this up?
I have the task ID and the connect to the cluster OK. I just need to be able to check for when my job is finished. Any example using the ISchedulerJob.State property?
Thanks!
- Upravený onemadscientist 7. května 2012 18:50