SGE Manual

SGE Manual

Implement your application

  • Select the suitable programming language for your application such as c/c++, java and edit your source code with text editor such as vi, nano.
[user@tera prog]$ vi test.c
  • Compile your source code by complier of selected programming language. For example, your application was edited by c programming language so you have to compile it with gcc complier.
[user@tera prog]$ gcc -Wall -o test test.c


Compute your application

To run your compiled program, you need to submit your program to SGE (Sun Grid Engine) batch scheduling system. Below are step-by-step instruction.

  • Create job submission script for SGE scheduler with your desired editor, such as vi or nano.
[user@tera prog]$ vi sge_script.job
  • Below are an example content of job script. You’ll need to replace APP with the full path to your program. Note that, #$ -cwd and #$ -S /bin/bash are the sge options. It only use in submit job to SGE. The option -cwd means the cluster will execute job from current directory and The option -S means the scheduler will specify the shell for the job.
#!/bin/bash

   #$ -cwd
   #$ -S /bin/bash

   APP=/home/user/prog/test

   $APP
  • To submit the script to SGE.
[user@tera prog]$ qsub sge_script.job
  • To show your job status
[user@tera prog]$ qstat
  • The output and error from MPI application are created in directory where user submitted jobs.

Powered by Drupal - Design by Artinet