This page introduces the easy use of OCTOPUS, for example, how to log-in to our system, make and execute FORTRAN program "sample.f90" and check a result.
 
 

1.How to log in

Basically, you must use our system from a remote place. Please connect your PC to our "Frontend node". The Frontend node is the entrance for using the large-scale computing system and you can make a program and give an order to execute a program on the large-scale computing system, checking the result. For basic usage, you do not have to connect directly to the large-scale computing system in addition to connecting to the Frontend node.
 

The way to log in to the Frontend node varies with whether you use Windows or Mac, or Linux. Please see the following directions:

How to log in

 

 

2.How to make a program file

Making a File on a Frontend node

If you make or edit or modify program files on a frontend node, you can use the editor, for example, vi or emacs. Please see the following:
How to use editor

 

Making a File on your PC(local PC)

You can make program file on your PC, Windows, or Mac. You must make a program file with the editor, for example, on a notepad application, and transfer a program file to the frontend node. See below:
How to transfer a file

 

An Example for making a program file

For this example, make a FORTRAN program "sample.f90" with the emacs editor as follows:
 
1.Start emacs and make sample.f90

    Please enter the following command on the frontend node.

    % emacs sample.f90

     

2.Edit sample.f90

    Please enter the following program sample.

    You must often copy or something edit with the emacs command. Therefore, you should understand the command gradually. If the emacs editor freezes, we recommend you enter the Ctrl-g command.

 

3.Save the program file

    Please enter Ctrl-x, and next enter Ctrl-s.

 

4.Close the emacs editor

    Please enter Ctrl-x, and next enter Ctrl-c.

 

3.Compiling

Previously, you made a sample program file. But you cannot execute this program file on the computing system because your program is only just a character string still. You have to convert your program file to execute the file for the computing system. This process is called "compiling".

 

* note

    Strictly speaking, this process has various names. Please see the following page for details about compiling:

    Program coding

 

You can use some compilers on OCTOPUS, the intel compiler, the GNU compiler, and the PGI compiler, etc.

 

Example of compiling

Compile the sample program with the intel compile.
1. Compile command

    Please enter the following command on the frontend server.

    % ifort sample.f90

     

2. Check the result of the execution

    If you did not see the error and were able to output a.out file, this compile has been successful.
     
    * note

      If you receive an error, please check your program file again. It might have misspellings.

 

References about compiling:

How to use intel compiler

 

4.Executing a program file

Program files can be executed in the following two ways:
 

* Batch processing

    In this way, you give the order to the computer to execute all processes together at one time. If you finish giving the order to the computer, you can logout.

 

* Interactive processing

    In this way, you execute the process on the computer at real time through a command, etc. This way is very simple.

      † We prohibit interactive processing on frontend server.

 

In batch processing, you have to make a "job script" file in which you write the execution process on the computer. The job script is the order to the computing system, and the execution process on the computing system is done with the job script. When you request the job script, the computing system may not execute quickly because many users use the same computing system at same time. If the computing system has many process executing at the same time, you will have you wait to execute. "The scheduler system" manages the order that executes programs on our system.

 

5.Making a job script file

A job script is constructed through the following two steps:

 
1. The head line is $PBS

    This line specifies the resources of the computing system and the environment.

2. The head line is not #PBS.

    The line is a shell script, and this specifies the process executing on the computing system.

 

An example of the job script is the following:

These lines beginning from #PBS specify the resources of the computing system and environment. Lines other than the #PBS line specify the process executing on the computing system (Shell script).
 

#PBS –q OCTOPUS

    This line specifies which computing system you execute. "OCTOPUS" is the job class of OCTOPUS CPU cluster. You specify the job class of the computing system on the job script. Please note that job class varies if you use under shared use or dedicated use.
     
    "OCTOPUS" is the job class just for receiving. The system has other job classes for execution. Your job script is sent to the receiving job class and is transferred automatically to the execution job class. Other job classes can be, for example, "OCTPHI" to submit to the OCTOPUS Xeon Phi nodes or "DBG" to run a short job for debugging etc.
     
    Please see the following page for details about the job class:
    OCTOPUS Job class table

 

#PBS –l elapstim_req=1:00:00

    This line specifies the resources of the computing system. This designation of the example is the elapse time (elapstime_req), which is one hour. This parameter needs to be specified. If your program use is more than the parameter of resources you specified, the calculation will stop. You have to look for a better parameter to fit your program.

 

cd $PBS_O_WORKDIR

    This line means that you need to go to the directory where you were at the time you sent the job script. $PBS_O_WORKDIR is the environment variable that was automatically set at the directory where you were at the time you sent the job script.
     

./a.out

    This line is used to execute the file compiled on "3.Compile".

 

Next we make a job script file "nqs.sh" with the emacs editor.

1.Start emacs and make nqs.sh

    Please enter the following command on Frontend node:

    % emacs nqs.sh

     

2.Edit nqs.sh

    Please enter the following example

    #!/bin/bash
    #PBS –q OCTOPUS
    #PBS –l elapstim_req=1:00:00
    cd $PBS_O_WORKDIR
    ./a.out

     

3.Save the job script file

    Please enter Ctrl-x, and next enter Ctrl-s.
     

4.Close the emacs editor

    Please enter Ctrl-x, and next enter Ctrl-c.

 

6.Submit a job script file

You must send a job script file and request the computing system for the executing process, This procedure called "submit a job script".
 
You can submit a job script with the qsub command. How to submit job script that you create on "5":

% qsub nqs.sh

When you enter the above command, you will get the following message:

Request 12345.oct submitted to queue: OCTOPUS.

This message means that your job script was correctly received by the computing system. The job script submitted will be attached to a Request ID. If you could not get the above message, your job script might have an error. Please check again!

 

If you want to get the status of a submitted job script, you can use the "qstat" command below:

% qstat

 

RequestID ReqName UserName Queue Pri STT S Memory CPU Elapse R H M Jobs
12345.oct nqs.sh user-id OCTOPUS 0 RUN 1.01M 0.2 1 Y Y Y 1

You should check "STT" in this information. STT will often display the following two statuses:

 

    QUE -> queued : The program is waiting for execute
    RUN -> running : The program is executing

 

Of course, STT will sometimes display other statuses besides these two . To understand the details of the qsub and qstat commands or other commands, please see below: .

 

About scheduler commands

 

7.Check the results

When the computing system finishes executing your program, the result of the execution will be transferred to the Frontend server. If you did not specify the destination of the output on your job script file, the result of the execution will be the standard output. If you did not specify the name of the standard output file and the error output file, the standard output will be named [Jobscript name].o[RequestID] and the standard error output [Jobscript name].e[RequestID]. (Of course, you can change thenames of these files!)
 
In the case of the above example program, you will get files named "nqs.sh.o12345" and "nqs.sh.e12345". How to check these files.
 

1.Check the standard output file

    % cat nqs.sh.o12345

    An example of the result:

    %NQSII(INFO): ------- Output from job:0000 -------
    Hello World!

     

2.Check the standard error output file

    % cat nqs.sh.e12345

    An example of the result:

    %NQSII(INFO): ------- Output from job:0000 -------

     

If you got the result in the above example, and if the standard error output file did not have an error message, the execution was a success.
 
 

Conclusion

We have finished introducing how to login for novice users. However, if you have any questions, please see below:
Consultation/Inquiry