Click or drag to resize

Getting Started Cluster Scheduler

Perform these steps to develop applications targeting the Cluster Job Scheduler.

Note Note

These instructions are intended to jump start developers during development. When deploying systems in production, please follow the instructions in the Help System.

After setting up an environment, consider completing the Programmer's Guide to learn how to submit jobs to the cluster scheduler.

Setting up your environment for the cluster scheduler, consists of the following:

Install Coordinator and Agent

Using the STK Parallel Computing Server 2.9 Install (available as separate install), install both the Coordinator and the Agent on the development machine using install.exe.

Tip Tip

When starting, running the Coordinator and Agent on the same machine as the development machine is strongly recommended. This help system always hard codes the Coordinator hostname to localhost. To use a Coordinator installed on another machine, replace localhost with the Coordinator's IP address or name.

Start the Install and check Coordinator. After the install finishes, the Coordinator will be available on the machine.

Start the Install and check Agent. When prompted for the user setting, specify DOMAIN\USERNAME, e.g. mydomain\username.

After the install finishes, an Agent will be available on the machine.

Install Coordinator and Agent for Linux

Move the STK Parallel Computing Server 2.9 Coordinator and Agent tar files to a directory where you would like to store the Coordinator and Agent.

Unpack the Coordinator tar file using the command "tar -xvf STK_Parallel_Computing_Coordinator_v2.9.tgz".

Unpack the Agent tar file using the command "tar -xvf STK_Parallel_Computing_Agent_v2.9.tgz".

Open the README.txt files in each of the created Coordinator and Agent directories to guide the rest of the configuration.

Optionally run Coordinator and Agent in console mode

Although not strictly required when developing, there are many advantages for running the Coordinator and Agent in console mode rather than as Windows Services:

  • Easier debugging
  • Logging is automatically displayed on the console
  • Restart and shutdown Coordinator and Agent faster

Instructions to disable coordinator and agent from automatically starting

Open Computer Management and find the Coordinator and Agent services. The name for the Coordinator and Agent Windows services are "STK Parallel Computing Coordinator" and "STK Parallel Computing Agent" respectively.

Find Services In Computer Management

Set the startup type from the default of Automatic to Manual. Do this both for the Coordinator and the Agent.

Coordinator Service Properties

Start Coordinator and Agent console applications

Open a command prompt and start AGI.Parallel.CoordinatorService.exe found in [Install Directory]\Coordinator\bin. e.g.

Note Note

"C:\Program Files\AGI\STK Parallel Computing Server 2.9\Coordinator\bin\AGI.Parallel.CoordinatorService.exe"

Coordinator Console

Open a second command prompt and start AGI.Parallel.AgentService.exe found in [Install Directory]\Agent\bin. e.g.

Note Note

"C:\Program Files\AGI\STK Parallel Computing Server 2.9\Agent\bin\AGI.Parallel.AgentService.exe"

Agent Console

Options in Console Mode

In console mode, options can be specified via the command line. This is especially useful when starting an agent as an easy way to specify the Coordinator name and the number of hosts to use. To see the options, append the /? flag. e.g.

Note Note

"C:\Program Files\AGI\STK Parallel Computing Server 2.9\Agent\bin\AGI.Parallel.AgentService.exe" /?

Agent Console Options
Setup Visual Studio project and add necessary assemblies

In Visual Studio, create a new Visual C# or Visual Basic project targeting .NET 4.7.2 or greater. The .NET API also supports .NET 5.0.0 or greater projects.

Visual Studio Project Setup

Add AGI.Parallel.Client.dll, AGI.Parallel.Infrastructure.dll to the project references.

Cluster Add Required Assemblies
Verify connecting to the Coordinator

The final step to ensure a working development setup is compiling a simple application and connecting to the Coordinator. In the Program.cs file of the project, copy and paste the code below. Compile and run. If everything goes smoothly - congratulations! Everything is setup for developing applications for the cluster scheduler. Let's get coding!

C#
using System;
using AGI.Parallel.Client;
using AGI.Parallel.Infrastructure;

namespace CodeSamples
{
    class Program
    {
        static void Main(string[] args)
        {
            using (IJobScheduler scheduler = new ClusterJobScheduler("localhost"))
            {
                scheduler.Connect();
                Console.WriteLine("Congratulations, you can start coding!");
            }
        }
    }
}
Note Note

If an exception is thrown at the Connect method that says something like "Cannot connect to Coordinator," the most likely reason is that the Coordinator is not running on the specified machine and port. Make sure the coordinator is running on that machine and confirm a firewall is not blocking the port.

Cluster Connect Exception
See Also

STK Parallel Computing Server 2.9 API for .NET