For executing the compiled load module(a.out) on large-scale computing system, you have to edit a job script file(shell script file for job-request) and submit to the scheduler.
 
The following is the example of job script.

 
The job-script file is two-stage construction.
1. Specify the resource of computer and environment(line started #PBS)
2. writing the process executed on the computer(shell script)

 

1. Specify the resource of computer and environment(line started #PBS)

Please write the comment part of job script as the option for submit. Please specify like "#PBS ..." on the comment part before first shell command.

 

Introduction of option

* We marked [for use!] about the required option.
* We marked [for MPI!] about the required option for calculating with MPI.
 

 

Job-class (-q option) [for use!]

#PBS -q [job-class name]

Please specify the job-class of computer you want to use on [job-class name]. The following is the example of [job-class name].

job type job-class name
Normal Priority SQUID
High Priority SQUID-H
Node-share Use SQUID-S
Debug Use DBG

Please see the job-class table for a detail.
 

* Which node type will our job execute on?

A job-class does not depend on node type. If "gpunum_job" (explained below) is set to 1 or more in the following -l option, the job is submitted to GPU node. If "--venode" (explained below) is set to 1 or more, the job is submitted to Vector node.

 
* What is a job-class "DBG"?

"DBG" is a short-time job class for debugging purposes. The elapstim_req (explained below) can be specified up to 10 minutes at the longest, but the waiting time is reduced because the job rotates quickly.

 

Specify the project ID(--group option)

    #PBS --group=Group name

    Please specify your group name. If you forget your group name, you can get it with "groups" command.

    Examples:
    #PBS --group=G12345(group name)
    #PBS --group=hp******(HPCI Project ID)
    #PBS --group=jh******(JHPCN Project ID)

    Example of groups command

      % groups
      ocean G12345
      (If you are not HPCI user and JHPCN user, your group name display after "ocean".)
       
      % groups
      hpci hp12345
      (If you are HPCI or JHPCN user, your group name display after "hpci".)
       

      % groups
      hpci hp12345 jh67890 G34567
      (If you belong to multiple groups, all group names display. Please specify one of them.)
       

 

Limit of resource (-l option) [for use!]

#PBS -l elapstim_req=[runtime limit],cpunum_job=[usage number of cpu cores],gpunum_job=[usage number of GPUs per node]
Please specify the resource of computer you want to use.

If you use multi node also, please specify the resource of one node.
cpunum_job: usage number of CPU cores per 1 node

The example in the case of executing on 1 node and 8 GPUs: gpunum_job=8

elapstim_req runtime limit
The example in the case of executing for 2 hour: elapstim_req=2:00:00
cpunum_job usage number of CPU cores per 1 node
If omitted, it will be automatically set to maximum number of core.
The example in the case of executing on 1 node and 76 cores: cpunum_job=76
gpunum_job It can be omitted if you do not use GPUs.

If your job runs longer than the value you specify elapstim_req option, it will be canceled. The maximum run time is different depending on the computer system. Please see the job-class table for the detail.
 
You can specify multiple options in one installment as the following with separating comma:

#PBS -l elapstim_req=2:00:00,cpunum_job=72,memsz_job=250GB,gpunum_job=8

 

Number of nodes (-b option) [for MPI!]

    #PBS -b [a number of nodes]

    Please specify a number of nodes, if you will calculate on multi node.

 

Type of job (-T option) [for MPI!]

    #PBS -T [type]

    Please specify a MPI type of job you want to execute. The following is the example of [type].

    MPI type [type]
    non-MPI do not need (this option can be omitted)
    intelMPI intmpi
    OpenMPI openmpi
    NECMPI necmpi

     

 

Environment variables, option (-v option)

    #PBS -v [Environment variables name]="[setting value]"

    This option set the specified environment variables to all node the job executes. You can set the environment variables with "setenv", also. But the variable will not set to the slave node, if you execute job on multi nodes. Therefore, please use -v option.
     

The sending started/terminated message to e-mail (-m,-M option)

    #PBS -m [mail option]
    #PBS -M [email address]

    When your job start to execute or terminate to execute, the system send message to your email address. Please set [mail option] about timing your want to receive the message.

    mail option explanation
    b E-mail is sent when request execution is started.
    e E-mail is sent when request execution is terminated.(includes an abnormal
    termination
    a E-mail is sent when request execution is abnormally terminated. Abnormal termination indicates the cases when at least one of the running batch job is terminated by signal or when forcibly terminated by trouble of SX hardware (CPU, IXS).
    n E-mail is not.
    eb E-mail is sent when request execution is started and terminated.

     

Result files option

    #PBS -e [file name for standard error output]
    #PBS -o [file name for standard output]

    Please specify the result files of a request by the -e and -o option. If you didn't specify this option, name of output files are the following.
    standard error output : "Job-name" + ".e" + "request ID"
    standard output : "Job-name" + ".o" + "request ID"
    These named file is convenient, if you analyze your program after the execution. We recommend that you don't specify this option.

 

Rerun setting(-r option)

    #PBS -r n

    Specify rerunning enable/disable of a request by the -r option. The “y” means enable and the “n” means disable.
     

Other options

 

2. writing the process executed on the computer(shell script)

    Basically please write shell script for executing files or control directories.

    module load BaseCPU #load Base environmentail modules
    cd $PBS_O_WORKDIR
    # move to the directory you submitted job
    ./a.out > result.txt
    # execute a.out, and redirect result to result.txt

    - Please see this page for environmental modules.
    - We prepare "$PBS_O_WORKDIR" as a environment valuables. This valuables is automatically set the directory you submitted job.
    - The limit of standard output and standard error output is no limit. But please specify redirect ">", if you want to output many data.
     

    ./a.out > output.txt

    Toggle Title
    The example of other redirection."]

      Please note that the following is the example script in the case of bash.
      execution file is "a.out".
      The refirect file of standard output file is "out.txt".
      The refirect file of standard error output file is "err.txt".
      The refirect file of standard output and error output file is "out_and_err.txt".

     
    redirect only the standard output file to the file.

    ./a.out > out.txt

     
    redirect the standard output file and the standard error output file to the same file.

    ./a.out >& out_and_err.txt

     
    redirect the standard output file and the standard error output file to the different file.

    (./a.out > out.txt) >& err.txt

     

Notice in describing job script

    Please insert the blank line at the end of script always. If you didn't insert the blank line, the system will not execute the last line of your script.