Job Scheduling

FastX can easily integrate with job scheduling application (Platform lsf, Grid Engine, MOAB etc) in high performance computing environments. Admins can create a custom script that can launch the job scheduler and schedule the compute application.  When the computation is done, the job scheduler can launch a FastX session to view the results.

Enable Job Scheduling

  1. Log in as a FastX Administrator
  2. Click on the System Configuration Icon
  3. Click on Configuration
  4. Check Enable Job Scheduling
  5. Save

Create a scheduling script

The scheduling script is a preprocessing script that will allow you to execute your job scheduler command (eg. bsub) instead of directly running the fastx start command.

All output (stdin and stdout) will be relayed back to the user

The following parameters are passed to the script.  The values come from the information passed when the end user presses the launch button from the clien

  • –command=”the command you want to run”
  • –geometry=”widthxheight” | “rootless”
  • –name=”the default session name”
  • –config_path=”typically the default installation config path”
  • –profile=”the profile you specified”

 

 

 

Add the command to start the session

Sessions can be started in one of two ways by calling the following commands

/usr/lib/fastx2/api/start

api/start launches the session and returns immediately.  The result is the connection information needed to connect to the session, or the error

/usr/lib/fastx2/tools/session

tools/session launches the session, but will not exit until the command (and thus the session) exits, and it will also pass any stdout/stderr from the command.

A bsub example

To submit a job, run

#!/bin/sh
bsub /usr/lib/fastx2/tools/session --command="xterm -ls" --geometry="rootless" --name="My Test Session"
echo "Your job has been scheduled"

Using the command line parameters  from the scheduling script

#!/bin/sh
bsub /usr/lib/fastx2/tools/session $@
echo "Your job has been scheduled"

The start and session commands can take more arguments (useful for setting up extra parameters to search for)

See api/start for a full list of options you can send

Now that the script is done, set up the profile so users can access it

 

Set up a profile

  1. Log in to the web client as a FastX Administrator
  2. Click on the System Configuration Icon
  3. Select  System > Profiles
  4. Create or Edit a new Profile
  5. Check Enable X11 TCP Connections
  6. Add the path to the scheduling script you created
  7. (optionally tell the FastX web service to run the script — default, the logged in user runs the script)
  8. Save

Launching the Schedule Script

Log in to the FastX User interface as usual and press the launch button

When you launch the session, instead of being redirected to the session, you will get the output of the scheduling script

Once the job scheduler (eg bsub) executes the command, the session will appear in the session list