HPC-AddTask -depend is not working in PowerShell
-
Saturday, April 21, 2012 12:20 AM
[HPCS R2 SP3]
I'm trying to create a job that has two tasks: "Task 3.1" and "Task 3.2". Task 3.2 depends on 3.1, so I wrote the following code:
#Job 3 $job = New-HpcJob -Name "Job 3" -NumNodes "*" Add-HpcTask -job $job -NumNodes "1" -CommandLine $command -Name "Task 3.1" -Stderr "task3.1-err.txt" -Stdout "task3.1-out.txt" -WorkDir $workDir Add-HpcTask -job $job -NumNodes "2" -CommandLine $command -Name "Task 3.2" -Stderr "task3.2-err.txt" -Stdout "task3.2-out.txt" -WorkDir $workDir -depend "Task 3.1"As you can see, I have set the "-depend" switch of the second task to the name of the first task.
When I submit the job, the dependency is not shown (please see: http://screencast.com/t/ZyVIxLWjkoI)
When I query the task, it does show the dependency:
$tasks = Get-HpcTask -job $job $tasks[1].Depend
The output from above is:
Task 3.1
Is this the right way to set the dependency via PowerShell? Why isn't the dependency showing up in ClusterManager?
Thanks!
- Edited by scorpiotek Saturday, April 21, 2012 12:25 AM Typo
All Replies
-
Wednesday, April 25, 2012 4:20 PM
Hi,
There is a difference between dependencies created via CLI/PSH/API and those provided with ClusterManager. By using PowerShell you can create dependencies, which are more complicated, than what can be displayed in the GUI, therefore they are not shown in there, but should still work as expected.
Please have a look at similar thread: http://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/dc38b7cc-9716-4b0c-b476-da1ae28f2565
Thank you,
Łukasz