1 / 25

Cluster Computing on the Cloud with StackIQ Rocks+

Cluster Computing on the Cloud with StackIQ Rocks+. Dr. Guy Tel- Zur. Connecting to EC2. C:UserstelzurDocumentsMTACloudComputing2012BSoftwareStackIQ. [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.

gada
Download Presentation

Cluster Computing on the Cloud with StackIQ Rocks+

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Connecting to EC2 C:\Users\telzur\Documents\MTA\CloudComputing2012B\Software\StackIQ

  3. [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

  4. After 5-10 minutes…

  5. After 5-10 minutes…

  6. Head node + 4 computing nodes, 5X16 cores

  7. MPI tests

  8. #include <stdio.h> #include <stdlib.h> #include "mpi.h" int main(intargc, char *argv[]) { MPI_Requestsendreq; MPI_Requestrecvreq; MPI_Status status; intnumprocs; intmyid; intnamelen; int left, right; intbufsize; 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);

  9. 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); }

  10. 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",

  11. myid, processor_name); MPI_Finalize(); exit(-1); } if (MPI_Wait(&sendreq, &status) != MPI_SUCCESS) { fprintf(stderr,"Process %d on %s:MPI_Waitfailed: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_Waitfailed:sendreq\n", myid, processor_name);

  12. 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(); }

  13. MPI tests

  14. Termination: init 0

  15. References • Videos • How to set up a cluster in Amazon EC2 using Rocks+ • How to setup Hadoop inside Amazon EC2 using Rocks+ • Web • Community • Cloud Computing

More Related