An Introduction to Linux Clusters

Course for the University of Costa Rica.
San Jose, Costa Rica.
Feb 27 – Mar 3 2006.

Instructor:
Edgar A. Leon, MS
Computer Science Department
University of New Mexico

Syllabus

This is a “hands on” course for building and programming a small cluster of Linux workstations. The course is divided into two parts: (1) Cluster Development, and (2) Cluster Programming and Applications.

Part I focuses on the development of a small Linux cluster. In this part I will cover:

  1. Installation, configuration and setup of a Linux cluster.
  2. Installation, set up and usage of a parallel programming environment.

Part II focuses on a programming environment for a Linux cluster. In this part I will cover:

  1. Parallel programming fundamentals for scientific computing.
  2. An introduction to the Message-Passing Interface standard (MPI) [MPI].
  3. Use the cluster to run real-world parallel applications.

Schedule

  • Monday: Configuration and setup of a Linux cluster.
    1. Set up of master node and slave nodes. Most of the cluster's configuration reside in the master node (head node). Slave nodes obtain their configurations from the master.
    2. Class will be divided in small groups to configure a “mini-cluster”. Every mini-cluster will act as one parallel computer.

Requirement: Linux fundamentals

  • Tuesday: Installation and set up of parallel programming environment.
    1. We will be using an MPI implementation [MPICH] and tools to create, build, launch and run parallel programs.
    2. Create, build and run a “hello world” program in the cluster.
    3. Assemble two small clusters of 4 to 8 nodes each depending on node availability.

Requirement: Linux fundamentals

  • Wednesday: MPI Basics.
    1. Introduction to parallel programming
    2. What is MPI?
    3. Writing, compiling and running MPI programs
    4. Point-to-point operations

Requirement: C programming fundamentals

  • Thursday: Intermediate MPI.
    1. Collective Operations
    2. MPI Groups, Contexts and Communicators

Requirement: MPI fundamentals

  • Friday: Running Parallel Benchmarks and Applications.
    1. Build and run the NAS Parallel Benchmarks NPB2 [NPB].
    2. Build and run other parallel applications [FFTW].

Requirement: MPI fundamentals

Monday: Configuration and setup of a Linux cluster

  • Hardware setup
    1. Divide class into groups.
    2. Every group will have one master node connected through cross-over cable to one client.
  • Sofware setup
    1. Install Linux on all nodes.
    2. IP address assignment.
      DHCP server/client.
    3. Export users' profiles to clients.
      Define users through LDAP server/client [LDAP].
    4. Authentication of remote users.
      Use PAM to grant ssh access to LDAP users [LDAPAuth].

Tuesday: Installation and set up of parallel programming environment

  • Sofware setup (cont.)
    1. Export user accounts.
      NFS server setup//etc/fstab client setup
    2. Assign names to clients.
      DNS, /etc/hosts
    3. Configure password-less ssh.
      Public/private key setup
  • Putting the cluster together
    1. Divide class in two groups. Every group will set up a cluster of 4 to 8 nodes using the tools learned.
  • Parallel programming environment
    1. Download MPICH
    2. Configure, build and install MPICH
    3. Build and run a simple MPI program
    4. Run the program in the whole cluster

Wednesday: MPI Basics

  • Introduction to parallel programming
    1. Shared memory vs distributed memory
    2. SIMD, MIMD and SPMD
    3. Message-Passing
    4. Point-to-point and collective operations
    5. Cooperative vs one-sided operations
  • MPI
    1. A specification not an implementation or library
    2. Six function MPI
      1. MPI_Init
      2. MPI_Finalize
      3. MPI_Comm_size
      4. MPI_Comm_rank
      5. MPI_Send
      6. MPI_Recv
    3. Collective Operations
      1. MPI_Bcast
    4. Assignments
      1. Broadcast using MPI_Bcast

Thursday: Intermediate MPI

  • MPI
    1. Collective Operations (cont)
      1. MPI_Reduce
      2. MPI_Allreduce
      3. MPI_Gather
      4. MPI_Scatter
      5. MPI_Allgather
    2. Assignments [Pacheco]
      1. Dot Product
      2. Matrix-vector multiplication
      3. Matrix-matrix multiplication

Friday: Running Parallel Benchmarks and Applications

We will use two parallel applications.

  • The NAS Parallel Benchmarks [NPB2]. NPB are a small set of programs designed to help evaluate the performance of parallel supercomputers. The benchmarks are derived from computational fluid dynamics (CFD) applications.
  • [FFTW] is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data.

References

  1. [Pacheco] Parallel Programming with MPI. Peter S. Pacheco. Morgan Kaufmann.

Links

  1. Building Linux Clusters. David Spector. O'Reilly.
  2. Using MPI. Portable Parallel Programming with the Message-Passing Interface.William Gropp, et.al.
 
/var/www/ssl/data/pages/building_linux_clusters.txt · Last modified: 2008/01/07 12:37 (external edit)     Back to top