Guidance for MPI test machine

We have arranged a MPI test machine for your self study of MPI programming. The machine name is gro.cc.titech.ac.jp, which operating system and architecture are the same as the contest machine(mpp.cc.titech.ac.jp),except the number of cpus (=16). The trial period will be from July 20th until July 30th.

How to connect the trial machine

You must secure-shell-connect(ssh) to the machine.
   ssh -l your_team_account gro.cc.titech.ac.jp
If you do not know how to connect the machine with ssh, please refer to the following help.

Your initial passwd will be obsolute within two days if you do not change the passwd after you receive it.

Operating System:Unix

  1. File System

  2. The Unix file system is almost the same as the Windows. Folder is called directory. Each directory or file are accessed with absolute path or relative path:
       (specified with absolute path)
       /             root directory
      /home/usr1/    
      (specified with relative path)
      ./             current directory
      ../bin/        go up one directory, then go down to bin directory
      ../program/a.c 
    
  3. File Properties

  4. example:

  5. Regular Expressions

  6. File names can be shorcutted.
      *.c         matches all files having ".c" extension
      program.*   matches all files having "program" name
      ABC*        matches all files having "ABC" heading
      *10*.c      matches all files having "10" in the middle of the file name
                  and ".c" extension
    
    Note: upper case letter and lower case letter are distinquished in file names. No blank should not be in file names.

Shell Command

The shell interpreter, running on the Unix, processes 'shell' commands.
  [command form]
   command_name              ex) ls
   command_name args         ex) ls -l
   command_name file_name(s) ex) cp a.c b.c
  command         description
  -------------------------------------------------
  exit            logout(disconnect telnet)

  passwd          change passwd
  ls              list up all directories/files under the current
  ls -l           list up all directories/files under the current
                  with long information
  ls prog/        list up all files under the directory prog
  ls ../          list up all files uder the father's directory
  ls /usr/etc     list up all files under the /usr/etc/

  cd ../          (change directory) go up one level
  cd prog/        go down one level, to the directory prog
  cd /usr/etc     move to the direcotry /usr/etc

  mkdir xxx       make a directory named xxx
  mkdir prog/a    make a directory named a under the directory prog
  rmdir xxx       remove the directory xxx

  cp file1 file2  copy file1 into file2
  cp -r xxx yyy   copy the directory xxx into yyy recursively

  mv file1 file2  move file1 to file2 (file1 will be renamed to file2)
  mv xxx yyy      the directory xxx will be renamed to yyy

  rm file1        remove file1
  rm F*           remove all files starting 'F'
  rm -r yyy       remove the directory yyy recursively

  less file.c     show the file.c (scroll down with SPACE key, quit with Q)

  !!              execute the previous command
  !c              execute the previous command beginning with 'c'

  mule -nw        invoke the editor mule without window

  man man         show up the online manual 'man'
  
  cc f.c -lmpi    compile a C program 'f.c' with the MPI library 'mpi'
                  default execution file name is 'a.out'
  mpirun -np 4 ./a.out  run 'a.out' with four cpus

File Transfer

You can use the file tranfer menu in 'ttssh', but the following methods are easier.
  1. in the Unix, type the following command
       cat > file.c
    
    , then paste the text which you want to transfer and type Ctrl D(EOF). The pasted text will be stored in the file.c.
  2. Invoke the editor mule, then paste the text on the buffer.
  3. If you have the command scp (secure copy), use it.

Editor

There is an Emacs-like editor mule.

Key abbreviation:

   C-x    type Cntorl key and X key
   M-x    type ESC key then type X key
Command List
   C-x C-c  quit the editor
   
   C-x C-f  open a file and load into the current buffer

   C-x C-s  save the current buffer into the corresponding file

   C-x k    delete the current buffer
   C-x 2    split the current buffer into two
   C-x 1    repair splitted buffers into one
   C-x o    go to the next buffer

   C-f      move right one cursor
   C-b      move left one cursor
   C-a      move the cursor to the head of the current line
   C-e      move the cursor to the end of the current line
   C-p      move the cursor the previous line
   C-n      move the cursor the next line
   M-<      mvoe the cursor to the begging of the buffer
   M->      move the cursor to the end of the buffer

   C-d      delete one letter to the left
   C-k      delete all letters to the right
   C-w      delete all letters from the marked position to the current
            (*-- to make the mark C-space --*)

   C-y      yank(paste) deleted texts
   
   C-g      quit the current mode

   M-x shel open the shell in a new buffer

MPI Programming

Refer to the tutorial. All MPI files listed in the tutorial are placed in the directory /tmp/mpitutorial of gro.cc.titech.ac.jp.