Lab 1: Introduction to Amazon EC2 and MPI

2,514 views
2,358 views

Published on

Cloud Computing Workshop 2013, ITU

Published in: Technology, Travel
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,514
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
56
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lab 1: Introduction to Amazon EC2 and MPI

  1. 1. 1: Introduction to Amazon EC2 and MPI Zubair Nabi zubair.nabi@itu.edu.pk April 17, 2013Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 1 / 13
  2. 2. Outline 1 Amazon EC2 2 Message Passing Interface Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 2 / 13
  3. 3. Outline 1 Amazon EC2 2 Message Passing Interface Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 3 / 13
  4. 4. Introduction Elastic Compute Cloud (EC2) allows you to rent out virtual machines and run them atop Amazon’s physical datacenters Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 4 / 13
  5. 5. Introduction Elastic Compute Cloud (EC2) allows you to rent out virtual machines and run them atop Amazon’s physical datacenters Possible to choose from a number of machine configurations Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 4 / 13
  6. 6. Introduction Elastic Compute Cloud (EC2) allows you to rent out virtual machines and run them atop Amazon’s physical datacenters Possible to choose from a number of machine configurations Vary in terms of processing power, memory configuration, and disk space Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 4 / 13
  7. 7. Introduction Elastic Compute Cloud (EC2) allows you to rent out virtual machines and run them atop Amazon’s physical datacenters Possible to choose from a number of machine configurations Vary in terms of processing power, memory configuration, and disk space Amazon Machine Image (AMI), which is a silo of preconfigured operating system stack and application software, is run atop these VMs Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 4 / 13
  8. 8. Introduction Elastic Compute Cloud (EC2) allows you to rent out virtual machines and run them atop Amazon’s physical datacenters Possible to choose from a number of machine configurations Vary in terms of processing power, memory configuration, and disk space Amazon Machine Image (AMI), which is a silo of preconfigured operating system stack and application software, is run atop these VMs Public AMIs work out-of-the-box with different application stacks, such as those designed for LAMP, Drupal, etc. Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 4 / 13
  9. 9. Instances Instances vary from Small to High-Memory Quadruple Extra Large and from Cluster GPU to High I/O Quadruple Extra Large Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 5 / 13
  10. 10. Instances Instances vary from Small to High-Memory Quadruple Extra Large and from Cluster GPU to High I/O Quadruple Extra Large M1 Small Instance: 1.7 GB memory 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit) 160 GB instance storage 32-bit or 64-bit platform Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 5 / 13
  11. 11. Instances Instances vary from Small to High-Memory Quadruple Extra Large and from Cluster GPU to High I/O Quadruple Extra Large M1 Small Instance: 1.7 GB memory 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit) 160 GB instance storage 32-bit or 64-bit platform High-Memory Quadruple Extra Large Instance: 68.4 GB memory 26 EC2 Compute Units (8 virtual core with 3.25 EC2 Compute Units each) 1690 GB instance storage 64-bit platform Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 5 / 13
  12. 12. Instances (2) Cluster GPU Quadruple Extra Large Instance: 22 GB memory 33.5 EC2 Compute Units (2 x Intel Xeon X5570, quad-core) 2 x NVIDIA Tesla “Fermi” M2050 GPUs 1690 GB instance storage 64-bit platform Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 6 / 13
  13. 13. Instances (2) Cluster GPU Quadruple Extra Large Instance: 22 GB memory 33.5 EC2 Compute Units (2 x Intel Xeon X5570, quad-core) 2 x NVIDIA Tesla “Fermi” M2050 GPUs 1690 GB instance storage 64-bit platform High I/O Quadruple Extra Large Instance: 60.5 GB memory 35 EC2 Compute Units (16 virtual cores) 2 SSD-based volumes each with 1024 GB of instance storage 64-bit platform Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 6 / 13
  14. 14. Storage Normal instances do not provide persistent storage Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 7 / 13
  15. 15. Storage Normal instances do not provide persistent storage Changes made to a VM are lost upon termination Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 7 / 13
  16. 16. Storage Normal instances do not provide persistent storage Changes made to a VM are lost upon termination To remedy this, Elastic Block Store (EBS) can be used Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 7 / 13
  17. 17. Storage Normal instances do not provide persistent storage Changes made to a VM are lost upon termination To remedy this, Elastic Block Store (EBS) can be used Persistent virtual drives that give the illusion of network-attached storage Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 7 / 13
  18. 18. S3 Storage with a simple web services interface Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  19. 19. S3 Storage with a simple web services interface Web interface used to store and retrieve data, at any time, from anywhere on the web Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  20. 20. S3 Storage with a simple web services interface Web interface used to store and retrieve data, at any time, from anywhere on the web The unit of storage allocation is a bucket which is a container for objects Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  21. 21. S3 Storage with a simple web services interface Web interface used to store and retrieve data, at any time, from anywhere on the web The unit of storage allocation is a bucket which is a container for objects Objects consist of object data and some metadata (key/value pairs) Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  22. 22. S3 Storage with a simple web services interface Web interface used to store and retrieve data, at any time, from anywhere on the web The unit of storage allocation is a bucket which is a container for objects Objects consist of object data and some metadata (key/value pairs) Each object has a unique identifier, a key, within a bucket Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  23. 23. S3 Storage with a simple web services interface Web interface used to store and retrieve data, at any time, from anywhere on the web The unit of storage allocation is a bucket which is a container for objects Objects consist of object data and some metadata (key/value pairs) Each object has a unique identifier, a key, within a bucket Updates are atomic at the key level Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  24. 24. S3 Storage with a simple web services interface Web interface used to store and retrieve data, at any time, from anywhere on the web The unit of storage allocation is a bucket which is a container for objects Objects consist of object data and some metadata (key/value pairs) Each object has a unique identifier, a key, within a bucket Updates are atomic at the key level Automatic replication across multiple servers Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 8 / 13
  25. 25. Outline 1 Amazon EC2 2 Message Passing Interface Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 9 / 13
  26. 26. MPI Language-independent communications protocol to build parallel applications within and across machines Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  27. 27. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  28. 28. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Point-to-point rendezvous-type send/receive operations Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  29. 29. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Point-to-point rendezvous-type send/receive operations Synchronous, asynchronous, and buffered variants Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  30. 30. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Point-to-point rendezvous-type send/receive operations Synchronous, asynchronous, and buffered variants Cartesian or graph-centric logical process topologies Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  31. 31. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Point-to-point rendezvous-type send/receive operations Synchronous, asynchronous, and buffered variants Cartesian or graph-centric logical process topologies Exchanging data between process pairs Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  32. 32. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Point-to-point rendezvous-type send/receive operations Synchronous, asynchronous, and buffered variants Cartesian or graph-centric logical process topologies Exchanging data between process pairs Aggregating partial results of computations Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  33. 33. MPI Language-independent communications protocol to build parallel applications within and across machines Interface to define virtual topology, synchronization, and communication between processes Point-to-point rendezvous-type send/receive operations Synchronous, asynchronous, and buffered variants Cartesian or graph-centric logical process topologies Exchanging data between process pairs Aggregating partial results of computations Synchronizing nodes Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 10 / 13
  34. 34. Features Used for distributed memory parallelism (shared-nothing systems) Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 11 / 13
  35. 35. Features Used for distributed memory parallelism (shared-nothing systems) Highly efficient: Can be used for many different models of computation, therefore can be used with many different applications Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 11 / 13
  36. 36. Features Used for distributed memory parallelism (shared-nothing systems) Highly efficient: Can be used for many different models of computation, therefore can be used with many different applications Used for SPMD-style coding Single Program, Multiple Data Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 11 / 13
  37. 37. Features Used for distributed memory parallelism (shared-nothing systems) Highly efficient: Can be used for many different models of computation, therefore can be used with many different applications Used for SPMD-style coding Single Program, Multiple Data Low-level therefore highly efficient Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 11 / 13
  38. 38. Example: Hello World! 1 #include <stdio.h > 2 #include mpi.h < > 3 4 int main (int argc , char ∗argv []) 5 { 6 int rank , size; 7 8 MPI_Init (&argc , &argv ); 9 MPI_Comm_rank ( MPI_COMM_WORLD , &rank );10 MPI_Comm_size ( MPI_COMM_WORLD , &size );11 printf (" Hello world on process %d of total %dn", rank , size );12 MPI_Finalize ();13 return 0;14 } Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 12 / 13
  39. 39. References Running a website on Amazon EC2: http://www.diginmotion.com/faq/ 108-running-a-website-on-amazon-ec2.pdf Zubair Nabi 1: Introduction to Amazon EC2 and MPI April 17, 2013 13 / 13

×