LAM (Local Area Multicomputer)

LAM is a parallel processing environment and development system for a network of independent computers. It features the MPI programming standard, supported by the monitoring and debugging tools.

LAM CONFIGURATION

1. Before running LAM you have to establish environment variables and search path for your shell. Add the following commands to your shell start-up file .zshrc

LAMHOME=/usr/local/porr/lam-6.5.9

PATH=$PATH:/usr/local/porr/lam-6.5.9/bin

MANPATH=$MANPATH:/usr/local/porr/lam-6.5.9/man

export LAMHOME PATH MANPATH

2. Next create the symbolic link

$ ln -s .zshrc .profile

3. Create a host file .rhosts listing the machine names, one on one line. An exampled file is given below (for the workstations csd accessible in the laboratory room 518; possible names: csd1, csd2,…,csd12). For example – if you plan to use 4 machines:

 

csd1

csd2

csd3

csd4

 

The file .rhosts should contain the name of the workstation on which you will run your program.

You can check the list of available machines using command rup.

4. Create a host file <host_file> listing the machine names, the same as listed in the file .rhosts. It should be placed in the directory with your binary files.

COMMENT! The root process (with rank = 0) is the process initialized on the first machine listed in the host file <host_file> (not the process executed on the machine on which you initiate the calculations).

5. Compilation. Any native C compiler is used to translate LAM programs for execution:

$ hcc –lm -o <progr_name_bin> <file_name_progr>.c

C++ programs:

$ hcp –lm -o < progr_name_bin> < file_name_progr >.cc


STARTING  LAM

1. Verify that the multicomputer is ready to run LAM

$ recon -v <host_file>

The recon tool checks if you have access privileges on each machine in the multicomputer.

2. Start the LAM session (if recon doesn’t report any problems)

$ lamboot -v <host_file>

The –v (verbose) causes lamboot to report on the start-up process as it progress.

3. Execute a program using mpirun.

(exampled program designed to run with two processes – two copies –c 2)

$ mpirun -v -c 2 <progr_name_bin>

In the above example the program is locatable on the machine on which it will run. The program is also transferred to the target machine before running it.

4. To terminate LAM use the comment !

$ wipe <host_file>

In the case of any problems please read the MPI documentation – file “lam61.doc.ps