Parallel Computation - running the "etch" program in the batch environment

Introduction

The programs for the etching problem are written in FORTRAN 77 using the MPI communication library. The etch program will be run on the Data Star, by following the instructions given below.
If you are interested in more information regarding the use of the Data Star, it is recommended that you read the Data Star User Guide.

Login on the Data Star

To login on the Data Star the secure shell command must be used on LINUX stations:

        % ssh -lUserID dslogin.sdsc.edu 

Transfer the files from the HPSS [High Performance Storage System] to the Data Star

To transfer the etch program and auxiliary files to the Data Star, you have to use pftp. pftp is an ftp-like interface to HPSS. The following links and text below describe how to use the pftp utility:

        % pftp 
    pftp> cd /users/csb/u4078 
    pftp> get etch-batch.tar 
    pftp> quit 
        %   

Compiling FORTRAN programs on the Data Star

In order to compile and run the etch program, you have to untar the file etch-batch.tar:

        %tar xvf etch-batch.tar
In the directory etch-batch, the following files will be present:
        - Makefile
        - etch.f
        - etchh.f
        - etchn.f
        - input64
        - plot.f
        - plotmatlab.f
        - script64
In order to compile the etch program, change to the etch-batch directory and run make:
        % cd etch-batch
        % make  

Running programs on the Data Star

To run the etch module in batch environment, for 64 processors, your login name [ux.....] has to be included in the script file "script64", instead of the "u4078" login name:

         % edit script64
         :1,$ s/u4078/ux..../
         :w!
         :quit
         % 
To submit the job in the batch queues:
     % llsubmit script64
Once a job is submitted, LoadLeveler assigns it a unique ID number. An actual submit session might therefore look similar to the following:
     %llsubmit your_job_script
     submit: The job "tf174i.36727" has been submitted
To cancel the job, use the job ID with the llcancel command as shown.
     %llcancel tf174i.36727 
To obtain the status of the job shown previously issue the following.
     %llq | grep ux....   where ux.... is your login name [see "man llq"]. 

Plotting the graphs using the plot program

First, compile this program by typing

        % f77 -o plot plot.f
Successful compilation will generate the executable plot file.

         Running the "plot" program
To run the plot program:
        % plot
You will be prompted for input data, specifically for the time step to be
plotted and the names of the files to use.

         Printing the results in the CAD-LAB at UCSB

To print the output file generated by the etch and plot programs, transfer the files to a UCSB machine, using the scp [secure copy] utility:

To copy the file "pi.f" from a local machine to the Data Star:

          scp pi.f userID@dslogin.sdsc.edu:pi.f

To copy the file pi.f from the Data Star to the Engineering domain machines:

          scp pi.f login_name@linux.engr.ucsb.edu:pi.f

which will copy the "pi.f" file to the machines in the "ENGR" domain.
["userID" is your LoginID on the Data Star and "login_name" is your LoginID on the
Engineering domain machines]

The output file generated by the plot program can now be printed in the CAD-Lab, after you switch to your CAD-Lab account, by using the following command for each output file to be printed:
        % enscript -r -fCourier5 name_of_output_file

Plotting the graphs in Matlab

Matlab is a powerful mathematical software which also has a nice plotting interface. To plot your graphs in Matlab, you have to first compile the program plotmatlab.f:

        % f77 -o plotmatlab plotmatlab.f
Successful compilation will generate the executable plotmatlab file.

         Running the plotmatlab program
To run the plotmatlab program:
        % plotmatlab
You will be prompted for input data, specifically for the time step to be
plotted and the names of the files to use.

         Displaying the results in Matlab in the CAD-LAB at UCSB

To transfer the files to a UCSB machine(into your X:\ directory), using the scp utility:

To copy the file "pi.m" from a local machine to the Data Star:

          scp pi.m userID@dslogin.sdsc.edu:pi.m

To copy the file pi.m from the Data Star to the Engineering domain machines:

          scp pi.m login_name@linux.engr.ucsb.edu:pi.m

which will copy the "pi.m" file to the machines in the "ENGR" domain.
["userID" is your LoginID on the Data Star and "login_name" is your LoginID on the
Engineering domain machines]
and exit the Data Star (b80 nodes) by typing "exit" or "logout".
On Windows, you can start Matlab in the conventional way.
On LINUX, you can use Matlab with Xwindow by
        % matlab -display your_computer_name:0.0    (your_computer_name e.g. ecipc004.engr.ucsb.edu)
or by setting the display to your computer first and then running Matlab:
        % setenv DISPLAY your_computer_name:0.0    (your_computer_name e.g. ecipc004.engr.ucsb.edu)
        % matlab

Once you access Matlab, open your files and run them by either pressing F5 or from the menus
Debug --> (Save and) Run
Print your plots using the Matlab figure window.

Parallel Programs, Compiler File, Plot Files, Input File, Script File and Output Files