Welcome to Windows HPC Community Sign in | Join | Help
in Search

Applications Blog

Submitting a simple job to a newly installed CCS

Just finished installing another brand new cluster running the release candidate binaries of CCS I downloaded via links through http://www.microsoft.com/hpc So, the next logical step that comes to mind is to exercise the cluster witha simple application...like the example to calculate PI in parallel using Microsoft MPI. To initiate this PI calculation exercise, I would need to submit a job to the CCS. The CCS includes Microsoft Job Scheduler which provides at least three simple ways of submitting a job to the CCS.

  1. via command line
  2. using .NET APIs
  3. using COM APIs

Although submitting a job via the command line is trivially simple, ala,

c:\workdir> job submit sample.exe

my personal favorite is submitting job through the .NET API using C#. Here is a simple code that I prefer.

The following code submits a "PI.exe" job.
----------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.ComputeCluster;

namespace test
{
  class Program
  {
    static void Main(string[] args)
    {
      try
      {
        ICluster cluster = new Cluster();
        cluster.Connect("Nilesh-HeadNode");
        IJob job = new Job();
        ITask task = new Task();
        task.CommandLine = "PI.exe";
        job.AddTask(task);
        cluster.AddJob(job);
        cluster.SubmitJob(job.Id, null, null, true, 0);
      }
      catch (Exception e)
      {
        Console.WriteLine(e.Message);
      }
    }
  }
}

Published Sunday, May 28, 2006 11:52 PM by NileshL

Comments

 

mil said:


it only works for me on the localhost. And even then the system is asking me first about user name for head node (which is localhost) n1, then password, then if i want to these credentials to be remembered.

if i modify this to run on couple nodes then jobs fails with the message then connection to node n2 was refused. If i save this failed job as a xml template and just rerun it from job scheduler GUI it runs fine. Obviously, while i am at gui, system knows my crednetials, but running from VS2005 it does not. How to fix this problem?

thanks.

October 27, 2006 7:59 PM
 

The Official Windows HPC Blog said:

posted Sunday, May 28, 2006 11:52 PM by NileshL | 1 Comments Just finished installing another brand new
October 17, 2008 11:42 AM
Anonymous comments are disabled

This Blog

Post Calendar

<May 2006>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Syndication

©2006 Microsoft Corporation. All rights reserved. Terms of Use |Trademarks |Privacy Statement
Powered by Community Server, by Telligent Systems