开发者

Microsoft HPC Scheduler not getting connected

I have开发者_Go百科 this code:

static void Main(string[] args)
        {
            Microsoft.Hpc.Scheduler.Scheduler scheduler = 
                new Microsoft.Hpc.Scheduler.Scheduler();

            Console.Write(scheduler.ClusterParameters + "\n" +
                scheduler.EnvironmentVariables + "\n");

        }

This is generating an exception. After the scheduler object is created, the properties ClusterParameters and EnvironmentVariables are holding exceptions.

The exception is, "Microsoft.Hpc.Scheduler.SchedulerException - The operation failed because you are not connected to the scheduler"

Any ideas?


The docs suggest you do not use the Scheduler class directly. Do this instead:

IScheduler scheduler = new Scheduler();

Once you've done this you would have to Connect to be able to use the properties. That's why you get that exception.

After creating an instance of this interface, call the IScheduler.Connect method to connect to a cluster. You can then create and schedule jobs, run commands, and retrieve information about nodes in the cluster.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜