Parallel Method for solving a Coupled PDE and its application in simulation of thin composite films Parallel Method for solving a Coupled PDE and its application.

Slides:



Advertisements
Similar presentations
Parallel Jacobi Algorithm Steven Dong Applied Mathematics.
Advertisements

Slide-1 University of Maryland Five Common Defect Types in Parallel Computing Prepared for Applied Parallel Computing Prof. Alan Edelman Taiga Nakamura.
MPI Basics Introduction to Parallel Programming and Cluster Computing University of Washington/Idaho State University MPI Basics Charlie Peck Earlham College.
National Center for Supercomputing Applications MPI for better scalability & application performance Byoung-Do Kim, Ph.D. National Center for Supercomputing.
Solving Equations = 4x – 5(6x – 10) -132 = 4x – 30x = -26x = -26x 7 = x.
Introduction to numerical simulation of fluid flows
MPI_Gatherv CISC372 Fall 2006 Andrew Toy Tom Lynch Bill Meehan.
Introduction to MPI-IO. 2 Common Ways of Doing I/O in Parallel Programs Sequential I/O: –All processes send data to rank 0, and 0 writes it to the file.
Parallel I/O. 2 Common Ways of Doing I/O in Parallel Programs Sequential I/O: –All processes send data to rank 0, and 0 writes it to the file.
Avoiding Communication in Sparse Iterative Solvers Erin Carson Nick Knight CS294, Fall 2011.
1 Lecture 12 Monte Carlo methods in parallel computing Parallel Computing Fall 2008.
Comp 422: Parallel Programming Lecture 8: Message Passing (MPI)
12b.1 Introduction to Message-passing with MPI UNC-Wilmington, C. Ferner, 2008 Nov 4, 2008.
Collective Communication.  Collective communication is defined as communication that involves a group of processes  More restrictive than point to point.
Chapter 13 Finite Difference Methods: Outline Solving ordinary and partial differential equations Finite difference methods (FDM) vs Finite Element Methods.
Introduction to MPI-IO Rajeev Thakur Mathematics and Computer Science Division Argonne National Laboratory.
Conjugate gradients, sparse matrix-vector multiplication, graphs, and meshes Thanks to Aydin Buluc, Umit Catalyurek, Alan Edelman, and Kathy Yelick for.
© Fluent Inc. 9/5/2015L1 Fluids Review TRN Solution Methods.
Lecture Objectives Review SIMPLE CFD Algorithm SIMPLE Semi-Implicit Method for Pressure-Linked Equations Define Residual and Relaxation.
Finite Mathematics Dr. Saeid Moloudzadeh Using Matrices to Solve Systems of Equations 1 Contents Algebra Review Functions and Linear Models.
CS 591x – Cluster Computing and Programming Parallel Computers Parallel Libraries.
L15: Putting it together: N-body (Ch. 6) October 30, 2012.
2a.1 Message-Passing Computing More MPI routines: Collective routines Synchronous routines Non-blocking routines ITCS 4/5145 Parallel Computing, UNC-Charlotte,
1 Collective Communications. 2 Overview  All processes in a group participate in communication, by calling the same function with matching arguments.
ECE 1747H : Parallel Programming Message Passing (MPI)
1 MPI: Message-Passing Interface Chapter 2. 2 MPI - (Message Passing Interface) Message passing library standard (MPI) is developed by group of academics.
MA471Fall 2003 Lecture5. More Point To Point Communications in MPI Note: so far we have covered –MPI_Init, MPI_Finalize –MPI_Comm_size, MPI_Comm_rank.
Part I MPI from scratch. Part I By: Camilo A. SilvaBIOinformatics Summer 2008 PIRE :: REU :: Cyberbridges.
MPI-2 Sathish Vadhiyar Using MPI2: Advanced Features of the Message-Passing.
Component-Based Implementation of STOMP Yilin Fang Bruce Palmer Pacific Northwest National Laboratory Silver Spring, July 2007.
Message Passing Programming Model AMANO, Hideharu Textbook pp. 140-147.
Performance Oriented MPI Jeffrey M. Squyres Andrew Lumsdaine NERSC/LBNL and U. Notre Dame.
Summary of MPI commands Luis Basurto. Large scale systems Shared Memory systems – Memory is shared among processors Distributed memory systems – Each.
MPI Introduction to MPI Commands. Basics – Send and Receive MPI is a message passing environment. The processors’ method of sharing information is NOT.
Lecture Objectives: Explicit vs. Implicit Residual, Stability, Relaxation Simple algorithm.
1 1 What does Performance Across the Software Stack mean?  High level view: Providing performance for physics simulations meaningful to applications 
Parallel Programming with MPI By, Santosh K Jena..
MA471Fall 2002 Lecture5. More Point To Point Communications in MPI Note: so far we have covered –MPI_Init, MPI_Finalize –MPI_Comm_size, MPI_Comm_rank.
Lecture Objectives Review Define Residual and Relaxation SIMPLE CFD Algorithm SIMPLE Semi-Implicit Method for Pressure-Linked Equations.
CSCI-455/522 Introduction to High Performance Computing Lecture 4.
Lecture Objectives: -Define the midterm project -Lean about eQUEST -Review exam problems.
Tutorial supported by the REASON IST project of the EU Heat, like gravity, penetrates every substance of the universe; its rays occupy all parts.
MPI-2 Sathish Vadhiyar Using MPI2: Advanced Features of the Message-Passing.
Timing in MPI Tarik Booker MPI Presentation May 7, 2003.
© David Kirk/NVIDIA and Wen-mei W. Hwu ECE408/CS483/ECE498al, University of Illinois, ECE408 / CS483 Applied Parallel Programming Lecture 27:
Chapter 5. Nonblocking Communication MPI_Send, MPI_Recv are blocking operations Will not return until the arguments to the functions can be safely modified.
3/12/2013Computer Engg, IIT(BHU)1 MPI-1. MESSAGE PASSING INTERFACE A message passing library specification Extended message-passing model Not a language.
2.7 Piecewise Functions p In real life functions are represented by a combination of equations, each corresponding to a part of the domain. These.
April 24, 2002 Parallel Port Example. April 24, 2002 Introduction The objective of this lecture is to go over a simple problem that illustrates the use.
Parallel Algorithms & Implementations: Data-Parallelism, Asynchronous Communication and Master/Worker Paradigm FDI 2007 Track Q Day 2 – Morning Session.
1 Parallel and Distributed Processing Lecture 5: Message-Passing Computing Chapter 2, Wilkinson & Allen, “Parallel Programming”, 2 nd Ed.
MPI Groups, Communicators and Topologies. Groups and communicators In our case studies, we saw examples where collective communication needed to be performed.
Message Passing Interface Using resources from
Programming assignment # 3 Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Equation solvers Scilab Matlab
COMP7330/7336 Advanced Parallel and Distributed Computing MPI Programming: 1. Collective Operations 2. Overlapping Communication with Computation Dr. Xiao.
Introduction to parallel computing concepts and technics
High Altitude Low Opening?
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing Message Passing Interface (cont.) Topologies.
Introduction to MPI.
Warm-Up . 4. Find the average and standard deviation of the following data set: 12, 13, 14 20, 25, 25, 32,27 5. Draw the normal for question 2   6. Use.
Piecewise Functions.
Message-Passing Computing More MPI routines: Collective routines Synchronous routines Non-blocking routines ITCS 4/5145 Parallel Computing, UNC-Charlotte,
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Message-Passing Computing Message Passing Interface (MPI)
Solving a System of Linear Equations
Computer Animation Algorithms and Techniques
Parallel Processing - MPI
Some codes for analysis and preparation for programming
Presentation transcript:

Parallel Method for solving a Coupled PDE and its application in simulation of thin composite films Parallel Method for solving a Coupled PDE and its application in simulation of thin composite films By: E. Nedaaee IASBS

What is thin film

is thermal fluctuations of the flux of the incoming particles, such that represents the fluctuations in the density of the incoming particles with, the order parameter which represents the difference between the densities of the two types of particles of the surface, the height of the surface Our Model:

Discretization Fully implicit finite difference method

Start Initial Conditions Solve Nonlinear Set of Equations. Finish Yes No Algorithm

Nonlinear Solver Newton-Raphson Method

Initial guess for X Solve. Set. No Yes Return Solving this linear set of equations by Conjugate- Gradient method and store J with sparse manner

Parallelization Method Domain Decomposition Solve Nonlinear Set of Equations. In each domain Yes No z Solve Nonlinear Set of Equations. In each domain Finish No Yes B.C. Exchange

MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &nump); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); nump_row = (int) sqrt(nump); dims[0] = nump_row; dims[1] = nump_row; periods[0] = periods[1] = 1; MPI_Cart_create(MPI_COMM_WORLD, 2, dims, periods, 0, &comm); MPI_Comm_rank(comm, &myrank); MPI_Cart_coords(comm, myrank, 2, coords); MPI_Type_hvector(np,1,(np+2)*sizeof(double), MPI_DOUBLE, &BC); MPI_Type_commit(&BC);

rcoords[0] = coords[0]; rcoords[1] = coords[1]+1; if(coords[1] == (nump_row-1)) rcoords[1] = 0; lcoords[0] = coords[0]; lcoords[1] = coords[1]-1; if(coords[1] == 0) lcoords[1] = nump_row - 1; bcoords[1] = coords[1]; bcoords[0] = coords[0]+1; if(coords[0] == (nump_row-1)) bcoords[0] = 0; tcoords[1] = coords[1]; tcoords[0] = coords[0]-1; if(coords[0] == 0) tcoords[0] = nump_row - 1; MPI_Cart_rank(comm, lcoords, &left); MPI_Cart_rank(comm, rcoords, &right); MPI_Cart_rank(comm, tcoords, &top); MPI_Cart_rank(comm, bcoords, &buttom);

MPI_File_open(comm, fh_m_out,MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh_m); MPI_File_open(comm, fh_h_out,MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh_h); MPI_Barrier(comm); lsizes[0] = np; lsizes[1] = np; gsizes[0] = np*nump_row*file_size; gsizes[1] = np*nump_row; memsizes[0] = lsizes[0] + 2; memsizes[1] = lsizes[1] + 2; start_indices[0] = start_indices[1] = 1; MPI_Type_create_subarray(2,memsizes, lsizes, start_indices, MPI_ORDER_C,MPI_DOUBLE, &memtype); MPI_Type_commit(&memtype);

start_indices[0] = coords[0]*lsizes[0]+count_ind*np*nump_row; start_indices[1] = coords[1]*lsizes[1]; MPI_Type_create_subarray(2,gsizes,lsizes,start_indices,MPI_ORDER_C,MPI_D OUBLE,&filetype); MPI_Type_commit(&filetype); MPI_File_set_view(fh_m, 0, MPI_DOUBLE, filetype, "native", MPI_INFO_NULL); MPI_File_set_view(fh_h, 0, MPI_DOUBLE, filetype, "native", MPI_INFO_NULL); MPI_File_write_all(fh_m,u_m, 1, memtype, &status); MPI_Wait(&req, &status); MPI_File_write_all(fh_h,u_h, 1, memtype, &status); MPI_Wait(&req, &status); MPI_Barrier(comm); count_ind +=1;

for(;;){ vecfunc(x); newt(x, &check,vecfunc); MPI_Barrier(comm); BC_exchange(left,right,top,buttom); MPI_Barrier(comm); pnorm_s = NORM(x,x_temp); MPI_Allreduce(&pnorm_s, &pnorm_r, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); if(sqrt(pnorm_r) <= 1.e-9) break; for(int i = 1; i<= 2*np*np; i++) x_temp[i] = x[i]; count +=1; }

void BC_exchange(int left, int right, int top, int buttom){ /*send and received from left neighbor*/ MPI_Isend(&u_h[1][1],np,MPI_DOUBLE, top,0,MPI_COMM_WORLD, &requests[0]); MPI_Irecv(&u_h[0][1],np,MPI_DOUBLE, top,0,MPI_COMM_WORLD, &requests[1]); /*send and received from right neighbor*/ MPI_Isend(&u_h[np][1],np,MPI_DOUBLE, buttom,0,MPI_COMM_WORLD, &requests[2]); MPI_Irecv(&u_h[np+1][1],np,MPI_DOUBLE,buttom,0,MPI_COMM_WORLD, &requests[3]); /*send and received from top neighbor*/ MPI_Isend(&u_h[1][np],1,BC, right,0,MPI_COMM_WORLD, &requests[4]); MPI_Irecv(&u_h[1][np+1],1,BC,right,0,MPI_COMM_WORLD, &requests[5]); /*send and received from bottom neighbor*/ MPI_Isend(&u_h[1][1],1,BC, left,0,MPI_COMM_WORLD, &requests[6]); MPI_Irecv(&u_h[1][0],1,BC, left,0,MPI_COMM_WORLD, &requests[7]); MPI_Waitall(8,requests, statuses);