05 - Announcements Classschedule TA JonathanBrownsworth

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements Class schedule CoC accounts coming real soon now (this week) Get familiar with HPC resources Homework #2 coming soon TA Jonathan Brownsworth j.brownsworth@gatech.edu Action Items Brainstorming term project ideas and collaborators Recommended books list on Amazon http://amzn.com/l/R11Z 4Q3BVWKKM7 Computational Science and Engineering Division 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CoC Cluster for CS6230 ± For homework and mini projects
Background image of page 2
QUICK OVERVIEW OF MPI Computational Science and Engineering Division 26
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Georgia 27 Message Passing Interface Distributed memory programming model Assumes that individual tasks do not share memory Applications must explicitly transfer data MPI is a specification MPI 1 traditional message-passing MPI 2 remote memory, parallel IO, dynamic processes, threads MPI is NOT a language It IS a library and runtime system Must use it in conjunction with C, C++, FORTRAN, Python, etc. Multiple implementations exist Open source: MPICH, MVAPICH, LAM, etc
Background image of page 4
Computational Science and Engineering Division 28 MPI Why? Software crisis Each vendor had their own interface Libraries enable code sharing Need to enable parallel applications, not porting
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Georgia 29 MPI-1 Point to Point Communication Send one message from a source task in the MPI application to a destination task Examples MPI_(I)Send MPI_(I)Recv MPI_SendRecv Datatypes Support for many different datatypes: native and user defined Contexts Separate communication into contexts Buffering Different types of communication can use different types of buffering
Background image of page 6
Georgia 30 Simple MPI Application 4 Tasks { printf ("(%d) Finished normally\n", rank); } { printf ("(%d) Finished normally\n", rank); } { printf ("(%d) Finished normally\n", rank); } #include <stdio.h> #include "mpi.h" main (int argc, char **argv) { int nprocs = -1; int rank = -1; char buf[256]; MPI_Init (&argc, &argv); MPI_Comm_size (MPI_COMM_WORLD, &nprocs); MPI_Comm_rank (MPI_COMM_WORLD, &rank); gethostname (buf, 256); printf ("MPI comm size is %d with rank %d executing on %s\n", nprocs, rank, buf); MPI_Finalize (); printf ("(%d) Finished normally\n", rank); } 0 1 2 3
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Georgia 31 Simple MPI Example Send/Recv MPI_Init (&argc, &argv); MPI_Comm_size (MPI_COMM_WORLD, &nprocs); MPI_Comm_rank (MPI_COMM_WORLD, &rank); printf ("Initializing (%d of %d)\n", rank, nprocs); MPI_Get_processor_name (processor_name, &namelen); printf ("(%d) is alive on %s\n", rank, processor_name); { int dest = (rank == nprocs - 1) ? (0) : (rank + 1); data = rank; MPI_Send (&data, 1, MPI_FLOAT, dest, tag, MPI_COMM_WORLD); printf ("(%d) sent data %f\n", rank, data); fflush (stdout); } { int src = (rank == 0) ? (nprocs - 1) : (rank - 1); MPI_Status status; MPI_Recv (&data, 1, MPI_FLOAT, src, tag, MPI_COMM_WORLD, &status); printf ("(%d) got data %f\n", rank, data); fflush (stdout); } MPI_Finalize (); Note: for illustration. Could deadlock under certain conditions.
Background image of page 8
Georgia 32 MPI-1 Collectives MPI collectives execute across collections of cooperating process groups COMM_WORLD Categories Communication: broadcast MPI_Bcast Computation: global sum MPI_Reduce Synchronization: barrier MPI_Barrier
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/04/2010 for the course CSE 6530 taught by Professor Jeffreyvetter during the Fall '10 term at Georgia Institute of Technology.

Page1 / 45

05 - Announcements Classschedule TA JonathanBrownsworth

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online