How do you get "finished" result back from HPC using C#
-
Wednesday, May 02, 2012 7:55 PM
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!
All Replies
-
Thursday, May 03, 2012 4:53 PM
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 -
Thursday, May 03, 2012 6:16 PM
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!
- Edited by onemadscientist Monday, May 07, 2012 6:50 PM