1 / 14

ITC Research Computing for Parallel Applications

ITC Research Computing for Parallel Applications. Murali Nethi. ITC Research. General day to day computing infrastructure E-mail SAS/Matlab Etc. High performance computing (HPC) infrastructure. Support for HPC. Clusters of interest

lanza
Download Presentation

ITC Research Computing for Parallel Applications

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. ITC Research Computing for Parallel Applications Murali Nethi

  2. ITC Research • General day to day computing infrastructure • E-mail • SAS/Matlab • Etc. • High performance computing (HPC) infrastructure

  3. Support for HPC • Clusters of interest • Aspen: 48 nodes with two AMD Atlon processors, 1GB RAM, connected with GigE interface • Birch: 32 nodes with two Intel Xeon CPUs, 2G RAM, Myricom interconnect • Cedar: 2 Opetron CPUs with 2G RAM, connected with GigE • All of them are Linux based!

  4. Experience with Aspen • Need • Hardware Description Language based Simulators • Long, time consuming and extremely memory intensive simulations • Request access to ITC clusters from http://www.itc.virginia.edu/research/hpc-account/ • Machine with windows running exceed or Linux

  5. Experience with Aspen • Subtle nuances • Secure shell login • Login with your UVA login id • Create superuser if login id from your host computer is different from uva id • Limited memory (Request for excess memory can be made) • Outside UVA network?

  6. Application Parallelism • Programming Models Defined • Threads/OpenMP • Standard well defined, shared memory Processors, Intel paragon compiler • Message Passing Interface(MPI) • MPP, cluster and DSM systems • Hybrid (Available)

  7. Message Passing Interface • Standard, Portable, Simple • Library implemented on top of C or Fortran • Messages are exchanged in send/receive paradigm • Two types of exchange possible • Collective communication • Scatter/broadcast • Point-to-point communication • Exchanged between two specific processes

  8. MPI datatypes • Well defined • Examples • MPI_INTEGER • MPI_REAL • … • MPI supplies a predefined communicator, MPI_COMM_WORLD, consisting of all processes running at the start of execution

  9. MPI message format • Senders process id, Receivers process id, Identifier, Communicator • Example code • call MPI_Comm_rank(comm,rank,ierr) if (rank .eq. 0) then call MPI_Send(sendbuf,count,MPI_REAL,1,tag,comm,ierr) call MPI_Recv(recvbuf,count,MPI_REAL,1,tag,comm,status,ierr) else if (rank .eq. 1) then call MPI_Recv(sendbuf,count,MPI_REAL,0,tag,comm,status,ierr) call MPI_Send(sendbuf,count,MPI_REAL,0,tag,comm,ierr) endif

  10. Parallelizing an application Example: Parallelizing Trapezoidal Rule program trapezoid implicit none ! Calculate a definite integral using trapezoid rule real :: a, b integer :: n real :: h, integral real :: f,x integer :: i read(*,*) a, b, n h=(b-a)/n integral = (f(a) + f(b))/2.0 x=a do i=1, n-1 x = x+h integral = integral + f(x) enddo integral = h*integral print *, integral stop End Source:http://www.itc.virginia.edu/research/talks/html/mpi_spring04.htm

  11. Parallel form using MPI program partrap implicit none real :: integral, total real :: a, b, h integer:: n real :: local_a, local_b integer:: local_n real :: trap, f include 'mpif.h' integer:: my_rank, p integer:: source, dest integer, parameter :: tag=50 integer:: ierr, status(MPI_STATUS_SIZE) call MPI_Init(ierr) call MPI_Comm_rank(MPI_COMM_WORLD, my_rank, ierr) call MPI_Comm_size(MPI_COMM_WORLD, p, ierr) if (my_rank .eq. 0) then read(*,*) a, b, n endif

  12. call MPI_Bcast(a,1,MPI_REAL,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(b,1,MPI_REAL,0,MPI_COMM_WORLD,ierr) call MPI_Bcast(n,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr) h= (b-a)/n local_n = n/p local_a = a + my_rank*local_n*h local_b = local_a + local_n*h integral = trap(local_a, local_b, local_n, h) call MPI_Reduce(integral, total, 1, MPI_REAL, MPI_SUM, & 0, MPI_COMM_WORLD,ierr) if (my_rank .eq. 0) then print *, total endif call MPI_Finalize(ierr) stop End

  13. real function trap(local_a, local_b, local_n, h) implicit none real :: local_a, local_b, h integer:: local_n real :: f,x integer:: i real :: parint parint = (f(local_a) + f(local_b))/2.0 trap = parint*h return end real function f(x) implicit none real :: x f=sin(x) + cos(x) return End Source: http://www.itc.virginia.edu/research/talks/html/mpi_spring04.htm

  14. More information • http://www.itc.virginia.edu/research/talks/ • ITC website • Tutorials of MPI available online

More Related