cluster computing on the cloud with stackiq rocks+

25
Cluster Computing on the Cloud with StackIQ Rocks+ Dr. Guy Tel-Zur

Upload: gada

Post on 15-Jan-2016

51 views

Category:

Documents


0 download

DESCRIPTION

Cluster Computing on the Cloud with StackIQ Rocks+. Dr. Guy Tel- Zur. Connecting to EC2. C:\Users\telzur\Documents\MTA\CloudComputing2012B\Software\StackIQ. [root@ip-10-17-24-123 ~]# rocks set attr ec2_key_pair c3-keypair [root@ip-10-17-24-123 ~]# rocks add instance compute count=4. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Cluster Computing on the Cloud with  StackIQ  Rocks+

Cluster Computing on the Cloud with StackIQ Rocks+

Dr. Guy Tel-Zur

Page 2: Cluster Computing on the Cloud with  StackIQ  Rocks+

Conn

ectin

g to

EC2

C:\Users\telzur\Documents\MTA\CloudComputing2012B\Software\StackIQ

Page 3: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 4: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 5: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 6: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 7: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 8: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 9: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 10: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 11: Cluster Computing on the Cloud with  StackIQ  Rocks+

[root@ip-10-17-24-123 ~]# rocks set attr ec2_key_pair c3-keypair[root@ip-10-17-24-123 ~]# rocks add instance compute count=4

Page 12: Cluster Computing on the Cloud with  StackIQ  Rocks+

After 5-10 minutes…

Page 13: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 14: Cluster Computing on the Cloud with  StackIQ  Rocks+

After 5-10 minutes…

Page 15: Cluster Computing on the Cloud with  StackIQ  Rocks+

Head node + 4 computing nodes, 5X16 cores

Page 16: Cluster Computing on the Cloud with  StackIQ  Rocks+

MPI tests

Page 17: Cluster Computing on the Cloud with  StackIQ  Rocks+

#include <stdio.h>#include <stdlib.h>#include "mpi.h"

intmain(int argc, char *argv[]){ MPI_Request sendreq; MPI_Request recvreq; MPI_Status status; int numprocs; int myid; int namelen; int left, right; int bufsize; char processor_name[MPI_MAX_PROCESSOR_NAME]; char *sendbuf, *recvbuf;

MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &myid); MPI_Get_processor_name(processor_name, &namelen);

Page 18: Cluster Computing on the Cloud with  StackIQ  Rocks+

fprintf(stderr,"Process %d on %s\n", myid, processor_name);

right = (myid + 1) % numprocs; if (myid == 0) { left = numprocs - 1; } else { left = (myid - 1) % numprocs; }

if (argc == 2) { bufsize = atoi(argv[1]); } else { bufsize = 1024 * 1024; }

if ((sendbuf = (char *)malloc(bufsize)) == NULL) { fprintf(stderr,"Process %d on %s:malloc failed\n", myid, processor_name);

MPI_Finalize(); exit(-1); }

Page 19: Cluster Computing on the Cloud with  StackIQ  Rocks+

if ((recvbuf = (char *)malloc(bufsize)) == NULL) { fprintf(stderr,"Process %d on %s:malloc failed\n", myid, processor_name);

MPI_Finalize(); exit(-1); }

if (MPI_Isend(sendbuf, bufsize, MPI_CHAR, right, 1, MPI_COMM_WORLD, &sendreq) != MPI_SUCCESS) {

fprintf(stderr,"Process %d on %s:MPI_Isend failed\n", myid, processor_name);

MPI_Finalize(); exit(-1); }

if (MPI_Irecv(recvbuf, bufsize, MPI_CHAR, left, 1, MPI_COMM_WORLD, &recvreq) != MPI_SUCCESS) {

fprintf(stderr,"Process %d on %s:MPI_Irecv failed\n",

Page 20: Cluster Computing on the Cloud with  StackIQ  Rocks+

myid, processor_name);

MPI_Finalize(); exit(-1); }

if (MPI_Wait(&sendreq, &status) != MPI_SUCCESS) { fprintf(stderr,"Process %d on %s:MPI_Wait failed:sendreq\n", myid, processor_name);

MPI_Finalize(); exit(-1); }

fprintf(stderr, "Process %d on %s:successfully sent (%d) bytes to id (%d)\n", myid, processor_name, bufsize, right);

if (MPI_Wait(&recvreq, &status) != MPI_SUCCESS) { fprintf(stderr,"Process %d on %s:MPI_Wait failed:sendreq\n", myid, processor_name);

Page 21: Cluster Computing on the Cloud with  StackIQ  Rocks+

MPI_Finalize(); exit(-1); }

fprintf(stderr, "Process %d on %s:successfully received (%d) bytes from id (%d)\n", myid, processor_name, bufsize, left);

MPI_Barrier(MPI_COMM_WORLD);

MPI_Finalize();}

Page 22: Cluster Computing on the Cloud with  StackIQ  Rocks+

MPI tests

Page 23: Cluster Computing on the Cloud with  StackIQ  Rocks+
Page 24: Cluster Computing on the Cloud with  StackIQ  Rocks+

Termination: init 0