Practical details

There are several MPI-systems available. I have fetched and compiled the LAM/MPI-system (LAM = Local Area Multicomputer). This system comes with the Linux-version as well, but that version does not have support for Fortran90.


This is how you use it:

  1. I have set up lam in   /chalmers/sw/unsup/lam-7.1.2/bin   on the system (not www).  You want this path to come before the default version already installed in the system. You want to have the corresponding man-pages, so you should prefix /chalmers/sw/unsup/lam-7.1.2/man to your MANPATH environment variable.
  2. Create a bhost file (man bhost for all the details). Suppose you want to run on one of our parallel machines, having four cpus. Login on such a machine and give the command hostname, this gives you the full Internet domain name of the parallel computer. Create a file, bhost say, containing the full domain name, followed (on the same line) by cpu=4
    Due to security reasons you can only create processes on the machine you are logged in on (so do not try to run a groups of computers).
  3. Start the lam-daemon (a background process helping with process control and other things) by giving the command:
     
    lamboot bhost

    If this was successful, you should get a printout like:

    LAM 7.1.2/MPI 2 C++/ROMIO - Indiana University
     
  4. Compile your program.
     
    mpicc my_prog.c  or  mpiCC my_prog.cc or  mpif77 my_prog.f90


    (I have configured the mpif77-command so you can compile Fortran90-programs as well. There is no mpif90-command).

  5. Suppose you are using three processes (cpu 0, 1, 2 and 3, in this case). Then you would execute your program by typing:
     
    mpirun c0-3 ./a.out  


    (man mpirun for details).

  6. When you have finished running programs, you stop the lam-daemon by typing lamhalt   .

You only have to perform step 2 once (for each different computer). Step 3 and 6 you do once for every session. Steps 4 and 5 are iterated (several) times, probably (unless your program works the first time).


Back