Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you can execute all the tasks you need to perform via command line you could write a simple application to do so through HPC.</p> <p>For example if your command will be executed on all the PNG files within a Directory MyPNGFiles you could foreach the command into HPC. We'll assume that we've already gotten the files as a List of FileInfo objects and passed it into this method.</p> <p>Let's assume also that you have a HPCSession class that wraps the MS exposed DurableSession or Session objects. This class handles your creation of the StartInfo, takes in the arguments to open the connection with HPC and allows you to spawn the Scheduler from it.</p> <pre><code>IScheduler scheduler = new Scheduler(); scheduler.connect(HPCSession.HeadNode); ISchedulerJob job = scheduler.CreateJob(); job.Name = "CMDLine HPCJob"; IScheduler task; int i = 1; foreach(FileInfo fi in files) { task = job.CreateTask(); task.Name = "Task Number " + i.ToString(); task.CommandLine = "pgm.exe " + fi.FullName; job.AddTask(task); task.Commit(); job.SubmitTask(task); task = null; i++; } job.Commit(); //A Job must be in a Configuring state before submission; usually isn't a problem but lets be sure if (job.State != JobState.Configuring) scheduler.ConfigureJob(job.JobID); scheduler.SubmitJob(job, "userName", "password"); </code></pre> <p>Be aware that you will want to use fully qualified paths to everything; including the command line tool. A Job executed on HPC through command line tasks is the exact same as logging into that machine, and opening a command prompt and running the command; so the command line command must be written with that in mind.</p> <p>This is a very simple implementation; you can do other things like subscribe to the TaskStateChange event to inspect how the cluster is doing, e.g. if you get back 15 tasks from one node all failed but other tasks are not failing you may want to remove that node programmatic-ally by opening the scheduler and added that node to the excluded nodes list. But fault tolerance considerations can come after it's executing the application properly :).</p> <p>You will also want to ensure that the HPC Node(s) that will execute your job a) have read or read/write access to the path the files will be; b) have read/write/execute access to the exe (or have the exe be local to the HPC Machine).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload