CLI tutorial

From ImageWiki

Jump to: navigation, search


Howto submit a job to OG

You can submit a job by using the command og_shcmd.

Here is how to run a program under linux:

 og_shcmd -p linux -w MAX <my_program> <my_program_args>

Where <my_program> obviously should be substituted with the name of your program (remember to include the full path) and <my_program_args> should be substituted with whatever arguments you want to pass to your program. The -i option makes OG return the job ID.

Here is how to run a matlab script:

 export MATLABPATH=<path to my_matlab_script>
 og_shcmd -p linux -w MAX /usr/local/bin/matlab -nodesktop -nojvm -nosplash -r <my_matlab_script>

Where <my_matlab_script> should be substituted with the name of your matlab script and <path to my_matlab_script> should be substituted with the path to where your matlab script is located.

IMPORTANT: You have to end your matlab script with the following command to terminate matlab and return to OG:


Checking the status of a job

Once you have submitted a job you find your job ID by using the command:


You can check its status (place in queue, run status, machine it runs on) by using the command og_stat. This command shows the status for all jobs runing on the cluster:


The command og_status gives a status of the complete cluster:


Retrieving output from your jobs

You can retrieve the output (called results in OG jargon) from whatever you write to standard out and standard error by:

 og_res -i <job_id> -o <out_file> -e <err_file>

Where <job_id> is again the job id and <out_file> is the file where you want the stdout output to go and <err_file> is where you want the stderr output to go.

You get a list of available output by:


How to remove / stop jobs

If for some reason you want to stop and remove a job you submitted to OG you have to use the following command:

  og_jobrm -i <job_id>

Getting online help on OG commands

Most OG commands can print a help description by appending the option -h. E.g.:

  og_shcmd -h

For more information consult the documentation at [1].

Personal tools