Simple examples how to run MPI program via PBS on Taurus HPC

Size: px
Start display at page:

Download "Simple examples how to run MPI program via PBS on Taurus HPC"

Transcription

1 Simple examples how to run MPI program via PBS on Taurus HPC MPI setup There's a number of MPI implementations install on the cluster. You can list them all issuing the following command: module avail/load/list/unload [me@ln01 ~]$ module avail /opt/modulefiles gcc intel mpich openmpi impi mkl mpich2-1.0 python ////////////////////////////////////////////////////////////////////////////////////// [me@ln01 ~]$ module load openmpi [me@ln01 ~]$ module load python [me@ln01 ~]$ ////////////////////////////////////////////////////////////////////////////////////// [me@ln01 ~]$ module list Currently Loaded Modulefiles: 1) openmpi ) python ////////////////////////////////////////////////////////////////////////////////////// [zhl@ln01 ~]$ module unload python [zhl@ln01 ~]$ module unload openmpi [zhl@ln01 ~]$ ////////////////////////////////////////////////////////////////////////////////////// Which module to use is a matter of taste. The example above demonstrates how to use OPENMPI Job submission The cluster is currently using the PBS/Torque batch queuing system. See the Torque Docs for further information. For command line usage, can simply things by including a script containing the environment settings for setting up and executing the command you wish to run, as well as any PBS command line options you'd like to specify for resource allocation, etc.

2 Here's a basic example that will execute /bin/echo on one node and output the string HELLO to standard out. hello_echo.pbs #PBS -l nodes=1:ppn=1 #PBS -o hello_echo.out #PBS -e hello_echo.err /bin/echo "HELLO!" PBS will redirect the stdout and stderr to files specified in the PBS declarations (-o for stdout, -e for stderr). The default path is the current working directory. This script can be submitted to PBS for execution by logging into the head node (taurus.xao.ac.cn) and executing: qsub [me@taurus~]$ qsub hello_echo.pbs You can check on the status of your job by running the qstat command: [me@pleiades]# qstat 129.taurus.xao.ac.cn Job id Name User Time Use S Queue taurus hello_echo.pbs me 0 Q batch MPI examples Here's an example which will request 72 processors on 6 nodes (make sure the $PATH for the MPI binary is accessibly on all nodes): The script bellow requests 6 computational nodes, 12 processors on each. The code bellow demonstrates a simple MPI program which reports from each process in communicator: hostname_mpi.c /* program hello shows the process ID and hostname/ /* using openmpi by Hailong Zhang at */ #include <mpi.h> #include <stdio.h> int main(int argc, char **argv) { int *buf, i, rank, nints, size, namelen;

3 char hostname[256]; char processor_name[mpi_max_processor_name]; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Get_processor_name(processor_name, &namelen); gethostname(hostname,255); printf("hello world! I am process number: %d of %d on host %s with processor %s\n", rank, size, hostname, processor_name); MPI_Finalize(); return 0; message_send_recv_mpi.c /* program jieli shows how to send and receive data between defferent hosts*/ /* using openmpi by Hailong Zhang at */ /** use the following command to run and give a minus number such as -9, Cheers : mpirun -hostfile die --prefix "/opt/software/openmpi gnu/" -np 42 -x "LD_LIBRARY_PATH=/opt/software/openmpi gnu/lib"./a.out * */ #include <mpi.h> #include <stdio.h> int main(int argc, char **argv) { int rank,value,size,namelen; char processor_name[mpi_max_processor_name]; MPI_Status status; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Get_processor_name(processor_name,&namelen); do { if (rank == 0){ fprintf(stderr, "\n Please give me a new value= ");

4 scanf("%d",&value); fprintf(stderr, "\n\nprocess %d read <-<-<- (%d)\n\n\n",rank,value); if (size>1){ MPI_Send(&value,1,MPI_INT,rank +1,0,MPI_COMM_WORLD); fprintf(stderr, "\nprocess %d (FROM %s) send (%d) ->-> to ->-> process %d, (FROM %s)\n",rank,processor_name,value,rank+1,processor_name); else { MPI_Recv(&value,1,MPI_INT,rank-1,0,MPI_COMM_WORLD,&status); fprintf(stderr, "\nprocess %d [FROM %s] receive (%d) <-<- from <-<process %d [FROM %s]\n",rank,processor_name,value,rank-1,processor_name); if (rank <size -1){ MPI_Send(&value,1,MPI_INT,rank +1,0,MPI_COMM_WORLD); fprintf(stderr, "\nprocess %d (FROM %s) send (%d) ->-> to ->-> process %d, (FROM %s)\n",rank,processor_name,value,rank+1,processor_name); MPI_Barrier(MPI_COMM_WORLD); while (value > 0); MPI_Finalize(); return 0; my_hello_mpi.c #include <mpi.h> #include <string.h> #include <stdio.h> int main(int argc, char* argv[]) { int my_rank; // rank of process int p; // number of processes int source; // rank of sender int dest; // rank of receiver int tag; // tag for messages char message[100]; // storage for messages MPI_Status status; // return status for receive // Start up MPI MPI_Init(&argc, &argv);

5 // Find out process rank MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); // Find out number of processes MPI_Comm_size(MPI_COMM_WORLD, &p); if(my_rank!= 0) { // for slave processes sprintf(message, "Greetings from process %d!", my_rank); dest = 0; // lets send message MPI_Send(message, strlen(message)+1, MPI_CHAR, dest, tag, MPI_COMM_WORLD); else { // for master process printf("i am the Master! My rank is %d.\n ", my_rank); for(source = 1; source < p; source++) { // lets receive message from source MPI_Recv(message, 100, MPI_CHAR, source, tag, MPI_COMM_WORLD, &status); printf("%s\n", message); // Shut down MPI MPI_Finalize(); processes_say_hello_to_each_other_mpi.c /* program shows how all processes say hello to each other, * use openmpi by Hailong Zhang at * use the following command to run and give the np number greater than 2, mpirun -hostfile die --prefix "/opt/software/openmpi gnu/" -np 4 -x "LD_LIBRARY_PATH=/opt/software/openmpi gnu/lib"./a.out * the content of file die is: * * gpu01 slots=6 * * gpu03 slots=10 * * gpu16 slots=24 * *The slots number means how many available cores does a node can giving. * */

6 #include <mpi.h> #include <stdio.h> #include <stdlib.h> void Hello(void); int main(int argc, char *argv[]){ int me,option,namelen,size; char processor_name[mpi_max_processor_name]; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &me); MPI_Comm_size(MPI_COMM_WORLD, &size); if (size<2){ fprintf(stderr,"systest requires at least 2 processes"); MPI_Abort(MPI_COMM_WORLD,1); MPI_Get_processor_name(processor_name,&namelen); fprintf(stderr,"process %d is alive on %s \n",me,processor_name); MPI_Barrier(MPI_COMM_WORLD); //to do the synchronization Hello(); MPI_Finalize(); void Hello(void){ int nproc, me;

7 int type = 1; int buffer[2],node; MPI_Status status; MPI_Comm_rank(MPI_COMM_WORLD, &me); MPI_Comm_size(MPI_COMM_WORLD, &nproc); if(me==0){ printf("\n Hellotest from all to all.\n"); fflush(stdout); for(node=0;node<nproc;node++){ if(node!= me){ buffer[0]=me; buffer[1]=node; MPI_Send(buffer,2,MPI_INT,node,type,MPI_COMM_WORLD); MPI_Recv(buffer,2,MPI_INT,node,type,MPI_COMM_WORLD,&status); if((buffer[0]!=node) (buffer[1]!= me)){ (void) fprintf(stderr, "Hello: %d!= %d or %d!= %d\n",buffer[0],node,buffer[1],me); printf("mismatch on hello process ids; node = %d\n",node); printf("hello from %d to %d\n",me,node); fflush(stdout); random_mpi.c /* * program shows how to do the random message send and receive with random source and random tag, * the use of status.mpi_source, status.mpi_tag * use openmpi by Hailong Zhang at * use the following command to run and give the np number greater than 2, mpirun -hostfile die --prefix "/opt/software/openmpi gnu/" -np 4 -x "LD_LIBRARY_PATH=/opt/software/openmpi gnu/lib"./a.out * the content of file die is:

8 * * gpu01 slots=6 * * gpu03 slots=10 * * gpu16 slots=24 *The slots number means how many available cores does a node can giving. */ #include <mpi.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]){ int rank,size,i,buf[i]; MPI_Status status; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); char processor_name[mpi_max_processor_name]; if(rank==0){ for(i=0;i<100*(size-1);i++){ s); MPI_Recv(buf,1,MPI_INT,MPI_ANY_SOURCE,MPI_ANY_TAG,MPI_COMM_WORLD,&statu printf("msg=%d from %d with tag %d \n",buf[0],status.mpi_source,status.mpi_tag); else { for (i=0;i<100;i++){ buf[0]=rank+i; MPI_Finalize(); MPI_Send(buf,1,MPI_INT,0,i,MPI_COMM_WORLD); Now you can compile the program mpicc [me@taurus~]$ mpicc hostname_mpi.c -o hostname_mpi hostname_mpi.pbs [me@taurus~]$

9 #!/bin/sh #PBS -N hostname_mpi #PBS -l nodes=6:ppn=12 #PBS -q batch #PBS -V #PBS -o hostname_mpi.o #PBS -e hostname_mpi.e nprocs=`wc -l < $PBS_NODEFILE` cd $PBS_O_WORKDIR mpirun --mca btl openib,self -np $nprocs -hostfile $PBS_NODEFILE./hostname_mpi "--mca btl openib,self" parameter means MPIRUN will use IB network to do the message passing, and "self" means communication with itself. Now the program can be submitted to PBS for execution: qsub qsub hostname_mpi.pbs Whatever was output to the standard i/o can be found in your local directory in files hostname_mpi.out or hostname_mpi.err. Tips & Tricks PDSH is an incredibly useful tool for cluster-wide process management. It can execute any command on any node in the HPC cluster. For detailed usage info see the man page (available on any host on Taurus): pdsh module load pdsh-2.26 man pdsh Some examples follow: To see your active processes on all the nodes (sorted by hostname): pdsh-ps-user-host pdsh -R ssh -w gpu[01-16] "ps -ef grep $USER" sort -k 1

10 To see the current CPU load for all machines in the cluster (sorted by hostname): pdsh-cpu-load pdsh -R ssh -w gpu[01-16] 'uptime' sort -k 1 Combine the above with the watch command to provide a cluster-wide top (with a 5-sec refresh): pdsh-cpu-load watch -n 5 'pdsh -R ssh -w gpu[01-16] uptime' sort -k 1 Use the NVIDIA SMI tools to report GPU related information for all GPUs: pdsh-nvsmi-gpu-temp [me@taurus~]$ pdsh -R ssh -w gpu[01-16] "nvidia-smi -q" Just get the current GPU temperature for all devices in the cluster: pdsh-nvsmi-gpu-temp [me@taurus~]$pdsh -R ssh -w gpu[01-16] "nvidia-smi -q -d 'TEMPERATURE'" Just get the current GPU temperature for all devices in the cluster: pdsh-nvsmi-gpu-temp-simple [me@taurus~]$ pdsh -R ssh -w gpu[01-16] "nvidia-smi -q -d 'TEMPERATURE' grep Gpu"

Holland Computing Center Kickstart MPI Intro

Holland Computing Center Kickstart MPI Intro Holland Computing Center Kickstart 2016 MPI Intro Message Passing Interface (MPI) MPI is a specification for message passing library that is standardized by MPI Forum Multiple vendor-specific implementations:

More information

ITCS 4145/5145 Assignment 2

ITCS 4145/5145 Assignment 2 ITCS 4145/5145 Assignment 2 Compiling and running MPI programs Author: B. Wilkinson and Clayton S. Ferner. Modification date: September 10, 2012 In this assignment, the workpool computations done in Assignment

More information

MPI introduction - exercises -

MPI introduction - exercises - MPI introduction - exercises - Paolo Ramieri, Maurizio Cremonesi May 2016 Startup notes Access the server and go on scratch partition: ssh a08tra49@login.galileo.cineca.it cd $CINECA_SCRATCH Create a job

More information

Getting started with the CEES Grid

Getting started with the CEES Grid Getting started with the CEES Grid October, 2013 CEES HPC Manager: Dennis Michael, dennis@stanford.edu, 723-2014, Mitchell Building room 415. Please see our web site at http://cees.stanford.edu. Account

More information

Solution of Exercise Sheet 2

Solution of Exercise Sheet 2 Solution of Exercise Sheet 2 Exercise 1 (Cluster Computing) 1. Give a short definition of Cluster Computing. Clustering is parallel computing on systems with distributed memory. 2. What is a Cluster of

More information

Parallel Programming Assignment 3 Compiling and running MPI programs

Parallel Programming Assignment 3 Compiling and running MPI programs Parallel Programming Assignment 3 Compiling and running MPI programs Author: Clayton S. Ferner and B. Wilkinson Modification date: October 11a, 2013 This assignment uses the UNC-Wilmington cluster babbage.cis.uncw.edu.

More information

The Message Passing Model

The Message Passing Model Introduction to MPI The Message Passing Model Applications that do not share a global address space need a Message Passing Framework. An application passes messages among processes in order to perform

More information

To connect to the cluster, simply use a SSH or SFTP client to connect to:

To connect to the cluster, simply use a SSH or SFTP client to connect to: RIT Computer Engineering Cluster The RIT Computer Engineering cluster contains 12 computers for parallel programming using MPI. One computer, phoenix.ce.rit.edu, serves as the master controller or head

More information

Tech Computer Center Documentation

Tech Computer Center Documentation Tech Computer Center Documentation Release 0 TCC Doc February 17, 2014 Contents 1 TCC s User Documentation 1 1.1 TCC SGI Altix ICE Cluster User s Guide................................ 1 i ii CHAPTER 1

More information

ME964 High Performance Computing for Engineering Applications

ME964 High Performance Computing for Engineering Applications ME964 High Performance Computing for Engineering Applications Overview of MPI March 24, 2011 Dan Negrut, 2011 ME964 UW-Madison A state-of-the-art calculation requires 100 hours of CPU time on the state-of-the-art

More information

Programming with MPI. Pedro Velho

Programming with MPI. Pedro Velho Programming with MPI Pedro Velho Science Research Challenges Some applications require tremendous computing power - Stress the limits of computing power and storage - Who might be interested in those applications?

More information

Introduction in Parallel Programming - MPI Part I

Introduction in Parallel Programming - MPI Part I Introduction in Parallel Programming - MPI Part I Instructor: Michela Taufer WS2004/2005 Source of these Slides Books: Parallel Programming with MPI by Peter Pacheco (Paperback) Parallel Programming in

More information

Programming with MPI on GridRS. Dr. Márcio Castro e Dr. Pedro Velho

Programming with MPI on GridRS. Dr. Márcio Castro e Dr. Pedro Velho Programming with MPI on GridRS Dr. Márcio Castro e Dr. Pedro Velho Science Research Challenges Some applications require tremendous computing power - Stress the limits of computing power and storage -

More information

Assignment 3 MPI Tutorial Compiling and Executing MPI programs

Assignment 3 MPI Tutorial Compiling and Executing MPI programs Assignment 3 MPI Tutorial Compiling and Executing MPI programs B. Wilkinson: Modification date: February 11, 2016. This assignment is a tutorial to learn how to execute MPI programs and explore their characteristics.

More information

Distributed Memory Programming with Message-Passing

Distributed Memory Programming with Message-Passing Distributed Memory Programming with Message-Passing Pacheco s book Chapter 3 T. Yang, CS240A Part of slides from the text book and B. Gropp Outline An overview of MPI programming Six MPI functions and

More information

COMP/CS 605: Introduction to Parallel Computing Topic : Distributed Memory Programming: Message Passing Interface

COMP/CS 605: Introduction to Parallel Computing Topic : Distributed Memory Programming: Message Passing Interface COMP/CS 605: Introduction to Parallel Computing Topic : Distributed Memory Programming: Message Passing Interface Mary Thomas Department of Computer Science Computational Science Research Center (CSRC)

More information

mith College Computer Science CSC352 Week #7 Spring 2017 Introduction to MPI Dominique Thiébaut

mith College Computer Science CSC352 Week #7 Spring 2017 Introduction to MPI Dominique Thiébaut mith College CSC352 Week #7 Spring 2017 Introduction to MPI Dominique Thiébaut dthiebaut@smith.edu Introduction to MPI D. Thiebaut Inspiration Reference MPI by Blaise Barney, Lawrence Livermore National

More information

Our new HPC-Cluster An overview

Our new HPC-Cluster An overview Our new HPC-Cluster An overview Christian Hagen Universität Regensburg Regensburg, 15.05.2009 Outline 1 Layout 2 Hardware 3 Software 4 Getting an account 5 Compiling 6 Queueing system 7 Parallelization

More information

High Performance Computing Course Notes Message Passing Programming I

High Performance Computing Course Notes Message Passing Programming I High Performance Computing Course Notes 2008-2009 2009 Message Passing Programming I Message Passing Programming Message Passing is the most widely used parallel programming model Message passing works

More information

Introduction to MPI. SHARCNET MPI Lecture Series: Part I of II. Paul Preney, OCT, M.Sc., B.Ed., B.Sc.

Introduction to MPI. SHARCNET MPI Lecture Series: Part I of II. Paul Preney, OCT, M.Sc., B.Ed., B.Sc. Introduction to MPI SHARCNET MPI Lecture Series: Part I of II Paul Preney, OCT, M.Sc., B.Ed., B.Sc. preney@sharcnet.ca School of Computer Science University of Windsor Windsor, Ontario, Canada Copyright

More information

Message Passing Interface

Message Passing Interface MPSoC Architectures MPI Alberto Bosio, Associate Professor UM Microelectronic Departement bosio@lirmm.fr Message Passing Interface API for distributed-memory programming parallel code that runs across

More information

Introduction to MPI. Ekpe Okorafor. School of Parallel Programming & Parallel Architecture for HPC ICTP October, 2014

Introduction to MPI. Ekpe Okorafor. School of Parallel Programming & Parallel Architecture for HPC ICTP October, 2014 Introduction to MPI Ekpe Okorafor School of Parallel Programming & Parallel Architecture for HPC ICTP October, 2014 Topics Introduction MPI Model and Basic Calls MPI Communication Summary 2 Topics Introduction

More information

HPC Parallel Programing Multi-node Computation with MPI - I

HPC Parallel Programing Multi-node Computation with MPI - I HPC Parallel Programing Multi-node Computation with MPI - I Parallelization and Optimization Group TATA Consultancy Services, Sahyadri Park Pune, India TCS all rights reserved April 29, 2013 Copyright

More information

To connect to the cluster, simply use a SSH or SFTP client to connect to:

To connect to the cluster, simply use a SSH or SFTP client to connect to: RIT Computer Engineering Cluster The RIT Computer Engineering cluster contains 12 computers for parallel programming using MPI. One computer, cluster-head.ce.rit.edu, serves as the master controller or

More information

UBDA Platform User Gudie. 16 July P a g e 1

UBDA Platform User Gudie. 16 July P a g e 1 16 July 2018 P a g e 1 Revision History Version Date Prepared By Summary of Changes 1.0 Jul 16, 2018 Initial release P a g e 2 Table of Contents 1. Introduction... 4 2. Perform the test... 5 3 Job submission...

More information

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI CS 470 Spring 2017 Mike Lam, Professor Distributed Programming & MPI MPI paradigm Single program, multiple data (SPMD) One program, multiple processes (ranks) Processes communicate via messages An MPI

More information

Tutorial: parallel coding MPI

Tutorial: parallel coding MPI Tutorial: parallel coding MPI Pascal Viot September 12, 2018 Pascal Viot Tutorial: parallel coding MPI September 12, 2018 1 / 24 Generalities The individual power of a processor is still growing, but at

More information

MPI: The Message-Passing Interface. Most of this discussion is from [1] and [2].

MPI: The Message-Passing Interface. Most of this discussion is from [1] and [2]. MPI: The Message-Passing Interface Most of this discussion is from [1] and [2]. What Is MPI? The Message-Passing Interface (MPI) is a standard for expressing distributed parallelism via message passing.

More information

For Ryerson EE Network

For Ryerson EE Network 10/25/2015 MPI Instructions For Ryerson EE Network Muhammad Ismail Sheikh DR. NAGI MEKHIEL Mpich-3.1.4 software is already installed on Ryerson EE network and anyone using the following instructions can

More information

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI CS 470 Spring 2018 Mike Lam, Professor Distributed Programming & MPI MPI paradigm Single program, multiple data (SPMD) One program, multiple processes (ranks) Processes communicate via messages An MPI

More information

Parallel Programming, MPI Lecture 2

Parallel Programming, MPI Lecture 2 Parallel Programming, MPI Lecture 2 Ehsan Nedaaee Oskoee 1 1 Department of Physics IASBS IPM Grid and HPC workshop IV, 2011 Outline 1 Introduction and Review The Von Neumann Computer Kinds of Parallel

More information

Message Passing Interface. George Bosilca

Message Passing Interface. George Bosilca Message Passing Interface George Bosilca bosilca@icl.utk.edu Message Passing Interface Standard http://www.mpi-forum.org Current version: 3.1 All parallelism is explicit: the programmer is responsible

More information

PCAP Assignment I. 1. A. Why is there a large performance gap between many-core GPUs and generalpurpose multicore CPUs. Discuss in detail.

PCAP Assignment I. 1. A. Why is there a large performance gap between many-core GPUs and generalpurpose multicore CPUs. Discuss in detail. PCAP Assignment I 1. A. Why is there a large performance gap between many-core GPUs and generalpurpose multicore CPUs. Discuss in detail. The multicore CPUs are designed to maximize the execution speed

More information

Distributed Systems + Middleware Advanced Message Passing with MPI

Distributed Systems + Middleware Advanced Message Passing with MPI Distributed Systems + Middleware Advanced Message Passing with MPI Gianpaolo Cugola Dipartimento di Elettronica e Informazione Politecnico, Italy cugola@elet.polimi.it http://home.dei.polimi.it/cugola

More information

Docker task in HPC Pack

Docker task in HPC Pack Docker task in HPC Pack We introduced docker task in HPC Pack 2016 Update1. To use this feature, set the environment variable CCP_DOCKER_IMAGE of a task so that it could be run in a docker container on

More information

Shifter on Blue Waters

Shifter on Blue Waters Shifter on Blue Waters Why Containers? Your Computer Another Computer (Supercomputer) Application Application software libraries System libraries software libraries System libraries Why Containers? Your

More information

Lesson 1. MPI runs on distributed memory systems, shared memory systems, or hybrid systems.

Lesson 1. MPI runs on distributed memory systems, shared memory systems, or hybrid systems. The goals of this lesson are: understanding the MPI programming model managing the MPI environment handling errors point-to-point communication 1. The MPI Environment Lesson 1 MPI (Message Passing Interface)

More information

ME964 High Performance Computing for Engineering Applications

ME964 High Performance Computing for Engineering Applications ME964 High Performance Computing for Engineering Applications Parallel Computing with MPI Building/Debugging MPI Executables MPI Send/Receive Collective Communications with MPI April 10, 2012 Dan Negrut,

More information

Message Passing Interface

Message Passing Interface Message Passing Interface DPHPC15 TA: Salvatore Di Girolamo DSM (Distributed Shared Memory) Message Passing MPI (Message Passing Interface) A message passing specification implemented

More information

int sum;... sum = sum + c?

int sum;... sum = sum + c? int sum;... sum = sum + c? Version Cores Time (secs) Speedup manycore Message Passing Interface mpiexec int main( ) { int ; char ; } MPI_Init( ); MPI_Comm_size(, &N); MPI_Comm_rank(, &R); gethostname(

More information

Introduction to MPI. HY555 Parallel Systems and Grids Fall 2003

Introduction to MPI. HY555 Parallel Systems and Grids Fall 2003 Introduction to MPI HY555 Parallel Systems and Grids Fall 2003 Outline MPI layout Sending and receiving messages Collective communication Datatypes An example Compiling and running Typical layout of an

More information

CS 426. Building and Running a Parallel Application

CS 426. Building and Running a Parallel Application CS 426 Building and Running a Parallel Application 1 Task/Channel Model Design Efficient Parallel Programs (or Algorithms) Mainly for distributed memory systems (e.g. Clusters) Break Parallel Computations

More information

MPI MESSAGE PASSING INTERFACE

MPI MESSAGE PASSING INTERFACE MPI MESSAGE PASSING INTERFACE David COLIGNON, ULiège CÉCI - Consortium des Équipements de Calcul Intensif http://www.ceci-hpc.be Outline Introduction From serial source code to parallel execution MPI functions

More information

Parallel hardware. Distributed Memory. Parallel software. COMP528 MPI Programming, I. Flynn s taxonomy:

Parallel hardware. Distributed Memory. Parallel software. COMP528 MPI Programming, I. Flynn s taxonomy: COMP528 MPI Programming, I www.csc.liv.ac.uk/~alexei/comp528 Alexei Lisitsa Dept of computer science University of Liverpool a.lisitsa@.liverpool.ac.uk Flynn s taxonomy: Parallel hardware SISD (Single

More information

JURECA Tuning for the platform

JURECA Tuning for the platform JURECA Tuning for the platform Usage of ParaStation MPI 2017-11-23 Outline ParaStation MPI Compiling your program Running your program Tuning parameters Resources 2 ParaStation MPI Based on MPICH (3.2)

More information

Computing with the Moore Cluster

Computing with the Moore Cluster Computing with the Moore Cluster Edward Walter An overview of data management and job processing in the Moore compute cluster. Overview Getting access to the cluster Data management Submitting jobs (MPI

More information

Message Passing Interface. most of the slides taken from Hanjun Kim

Message Passing Interface. most of the slides taken from Hanjun Kim Message Passing Interface most of the slides taken from Hanjun Kim Message Passing Pros Scalable, Flexible Cons Someone says it s more difficult than DSM MPI (Message Passing Interface) A standard message

More information

Parallel Programming Using MPI

Parallel Programming Using MPI Parallel Programming Using MPI Prof. Hank Dietz KAOS Seminar, February 8, 2012 University of Kentucky Electrical & Computer Engineering Parallel Processing Process N pieces simultaneously, get up to a

More information

User Guide of High Performance Computing Cluster in School of Physics

User Guide of High Performance Computing Cluster in School of Physics User Guide of High Performance Computing Cluster in School of Physics Prepared by Sue Yang (xue.yang@sydney.edu.au) This document aims at helping users to quickly log into the cluster, set up the software

More information

ME964 High Performance Computing for Engineering Applications

ME964 High Performance Computing for Engineering Applications ME964 High Performance Computing for Engineering Applications Parallel Computing with MPI: Introduction March 29, 2012 Dan Negrut, 2012 ME964 UW-Madison The empires of the future are the empires of the

More information

Introduction to the Message Passing Interface (MPI)

Introduction to the Message Passing Interface (MPI) Introduction to the Message Passing Interface (MPI) CPS343 Parallel and High Performance Computing Spring 2018 CPS343 (Parallel and HPC) Introduction to the Message Passing Interface (MPI) Spring 2018

More information

OpenMP and MPI. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico.

OpenMP and MPI. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico. OpenMP and MPI Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico November 15, 2010 José Monteiro (DEI / IST) Parallel and Distributed Computing

More information

Parallel programming in Madagascar. Chenlong Wang

Parallel programming in Madagascar. Chenlong Wang Parallel programming in Madagascar Chenlong Wang Why parallel? Time &Money Non-local resource Parallel Hardware 1 HPC structure Management web Calculation web 2 Outline Parallel calculation in Madagascar

More information

Tutorial 2: MPI. CS486 - Principles of Distributed Computing Papageorgiou Spyros

Tutorial 2: MPI. CS486 - Principles of Distributed Computing Papageorgiou Spyros Tutorial 2: MPI CS486 - Principles of Distributed Computing Papageorgiou Spyros What is MPI? An Interface Specification MPI = Message Passing Interface Provides a standard -> various implementations Offers

More information

MPI: Parallel Programming for Extreme Machines. Si Hammond, High Performance Systems Group

MPI: Parallel Programming for Extreme Machines. Si Hammond, High Performance Systems Group MPI: Parallel Programming for Extreme Machines Si Hammond, High Performance Systems Group Quick Introduction Si Hammond, (sdh@dcs.warwick.ac.uk) WPRF/PhD Research student, High Performance Systems Group,

More information

Message-Passing Computing

Message-Passing Computing Chapter 2 Slide 41þþ Message-Passing Computing Slide 42þþ Basics of Message-Passing Programming using userlevel message passing libraries Two primary mechanisms needed: 1. A method of creating separate

More information

Outline. Introduction to HPC computing. OpenMP MPI. Introduction. Understanding communications. Collective communications. Communicators.

Outline. Introduction to HPC computing. OpenMP MPI. Introduction. Understanding communications. Collective communications. Communicators. Lecture 8 MPI Outline Introduction to HPC computing OpenMP MPI Introduction Understanding communications Collective communications Communicators Topologies Grouping Data for Communication Input / output

More information

Practical Introduction to Message-Passing Interface (MPI)

Practical Introduction to Message-Passing Interface (MPI) 1 Practical Introduction to Message-Passing Interface (MPI) October 1st, 2015 By: Pier-Luc St-Onge Partners and Sponsors 2 Setup for the workshop 1. Get a user ID and password paper (provided in class):

More information

L14 Supercomputing - Part 2

L14 Supercomputing - Part 2 Geophysical Computing L14-1 L14 Supercomputing - Part 2 1. MPI Code Structure Writing parallel code can be done in either C or Fortran. The Message Passing Interface (MPI) is just a set of subroutines

More information

Introduction to Parallel Programming Message Passing Interface Practical Session Part I

Introduction to Parallel Programming Message Passing Interface Practical Session Part I Introduction to Parallel Programming Message Passing Interface Practical Session Part I T. Streit, H.-J. Pflug streit@rz.rwth-aachen.de October 28, 2008 1 1. Examples We provide codes of the theoretical

More information

Message Passing Interface

Message Passing Interface Message Passing Interface by Kuan Lu 03.07.2012 Scientific researcher at Georg-August-Universität Göttingen and Gesellschaft für wissenschaftliche Datenverarbeitung mbh Göttingen Am Faßberg, 37077 Göttingen,

More information

PC (PC Cluster Building and Parallel Computing)

PC (PC Cluster Building and Parallel Computing) PC (PC Cluster Building and Parallel Computing) 2011 3 30 כ., כ כ. כ. PC. כ. כ. 1 כ, 2. 1 PC. PC. 2. MPI(Message Passing Interface),. 3 1 PC 7 1 PC... 7 1.1... 7 1.2... 10 2 (Master computer) Linux...

More information

Parallel Programming with MPI: Day 1

Parallel Programming with MPI: Day 1 Parallel Programming with MPI: Day 1 Science & Technology Support High Performance Computing Ohio Supercomputer Center 1224 Kinnear Road Columbus, OH 43212-1163 1 Table of Contents Brief History of MPI

More information

Anomalies. The following issues might make the performance of a parallel program look different than it its:

Anomalies. The following issues might make the performance of a parallel program look different than it its: Anomalies The following issues might make the performance of a parallel program look different than it its: When running a program in parallel on many processors, each processor has its own cache, so the

More information

Introduction to Parallel Programming (Session 2: MPI + Matlab/Octave/R)

Introduction to Parallel Programming (Session 2: MPI + Matlab/Octave/R) Introduction to Parallel Programming (Session 2: MPI + Matlab/Octave/R) Xingfu Wu Department of Computer Science & Engineering Texas A&M University IAMCS, Feb 24, 2012 Survey n Who is mainly programming

More information

Parallel Numerical Algorithms

Parallel Numerical Algorithms Parallel Numerical Algorithms http://sudalabissu-tokyoacjp/~reiji/pna16/ [ 5 ] MPI: Message Passing Interface Parallel Numerical Algorithms / IST / UTokyo 1 PNA16 Lecture Plan General Topics 1 Architecture

More information

CS 351 Week The C Programming Language, Dennis M Ritchie, Kernighan, Brain.W

CS 351 Week The C Programming Language, Dennis M Ritchie, Kernighan, Brain.W CS 351 Week 6 Reading: 1. The C Programming Language, Dennis M Ritchie, Kernighan, Brain.W Objectives: 1. An Introduction to Message Passing Model 2. To learn about Message Passing Libraries Concepts:

More information

OpenMP and MPI. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico.

OpenMP and MPI. Parallel and Distributed Computing. Department of Computer Science and Engineering (DEI) Instituto Superior Técnico. OpenMP and MPI Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico November 16, 2011 CPD (DEI / IST) Parallel and Distributed Computing 18

More information

Practical Introduction to Message-Passing Interface (MPI)

Practical Introduction to Message-Passing Interface (MPI) 1 Outline of the workshop 2 Practical Introduction to Message-Passing Interface (MPI) Bart Oldeman, Calcul Québec McGill HPC Bart.Oldeman@mcgill.ca Theoretical / practical introduction Parallelizing your

More information

MPI. (message passing, MIMD)

MPI. (message passing, MIMD) MPI (message passing, MIMD) What is MPI? a message-passing library specification extension of C/C++ (and Fortran) message passing for distributed memory parallel programming Features of MPI Point-to-point

More information

MPI MPI. Linux. Linux. Message Passing Interface. Message Passing Interface. August 14, August 14, 2007 MPICH. MPI MPI Send Recv MPI

MPI MPI. Linux. Linux. Message Passing Interface. Message Passing Interface. August 14, August 14, 2007 MPICH. MPI MPI Send Recv MPI Linux MPI Linux MPI Message Passing Interface Linux MPI Linux MPI Message Passing Interface MPI MPICH MPI Department of Science and Engineering Computing School of Mathematics School Peking University

More information

Assignment 3 Key CSCI 351 PARALLEL PROGRAMMING FALL, Q1. Calculate log n, log n and log n for the following: Answer: Q2. mpi_trap_tree.

Assignment 3 Key CSCI 351 PARALLEL PROGRAMMING FALL, Q1. Calculate log n, log n and log n for the following: Answer: Q2. mpi_trap_tree. CSCI 351 PARALLEL PROGRAMMING FALL, 2015 Assignment 3 Key Q1. Calculate log n, log n and log n for the following: a. n=3 b. n=13 c. n=32 d. n=123 e. n=321 Answer: Q2. mpi_trap_tree.c The mpi_trap_time.c

More information

Distributed Memory Programming with MPI

Distributed Memory Programming with MPI Distributed Memory Programming with MPI Part 1 Bryan Mills, PhD Spring 2017 A distributed memory system A shared memory system Identifying MPI processes n Common pracace to idenafy processes by nonnegaave

More information

Linux Clusters Institute: Introduction to MPI. Presented by: David Swanson, Director, HCC Based upon slides by: Henry Neeman, University of Oklahoma

Linux Clusters Institute: Introduction to MPI. Presented by: David Swanson, Director, HCC Based upon slides by: Henry Neeman, University of Oklahoma Linux Clusters Institute: Introduction to MPI Presented by: David Swanson, Director, HCC Based upon slides by: Henry Neeman, University of Oklahoma Outline MPI Role Playing Exercise Distributed Parallelism

More information

P a g e 1. HPC Example for C with OpenMPI

P a g e 1. HPC Example for C with OpenMPI P a g e 1 HPC Example for C with OpenMPI Revision History Version Date Prepared By Summary of Changes 1.0 Jul 3, 2017 Raymond Tsang Initial release 1.1 Jul 24, 2018 Ray Cheung Minor change HPC Example

More information

Lecture 3 Message-Passing Programming Using MPI (Part 1)

Lecture 3 Message-Passing Programming Using MPI (Part 1) Lecture 3 Message-Passing Programming Using MPI (Part 1) 1 What is MPI Message-Passing Interface (MPI) Message-Passing is a communication model used on distributed-memory architecture MPI is not a programming

More information

Faculty of Electrical and Computer Engineering Department of Electrical and Computer Engineering Program: Computer Engineering

Faculty of Electrical and Computer Engineering Department of Electrical and Computer Engineering Program: Computer Engineering Faculty of Electrical and Computer Engineering Department of Electrical and Computer Engineering Program: Computer Engineering Course Number EE 8218 011 Section Number 01 Course Title Parallel Computing

More information

ACEnet for CS6702 Ross Dickson, Computational Research Consultant 29 Sep 2009

ACEnet for CS6702 Ross Dickson, Computational Research Consultant 29 Sep 2009 ACEnet for CS6702 Ross Dickson, Computational Research Consultant 29 Sep 2009 What is ACEnet? Shared resource......for research computing... physics, chemistry, oceanography, biology, math, engineering,

More information

Supercomputing in Plain English

Supercomputing in Plain English Supercomputing in Plain English An Introduction to High Performance Computing Part VI: Distributed Multiprocessing Henry Neeman, Director The Desert Islands Analogy Distributed Parallelism MPI Outline

More information

First day. Basics of parallel programming. RIKEN CCS HPC Summer School Hiroya Matsuba, RIKEN CCS

First day. Basics of parallel programming. RIKEN CCS HPC Summer School Hiroya Matsuba, RIKEN CCS First day Basics of parallel programming RIKEN CCS HPC Summer School Hiroya Matsuba, RIKEN CCS Today s schedule: Basics of parallel programming 7/22 AM: Lecture Goals Understand the design of typical parallel

More information

Part One: The Files. C MPI Slurm Tutorial - Hello World. Introduction. Hello World! hello.tar. The files, summary. Output Files, summary

Part One: The Files. C MPI Slurm Tutorial - Hello World. Introduction. Hello World! hello.tar. The files, summary. Output Files, summary C MPI Slurm Tutorial - Hello World Introduction The example shown here demonstrates the use of the Slurm Scheduler for the purpose of running a C/MPI program. Knowledge of C is assumed. Having read the

More information

MPI 1. CSCI 4850/5850 High-Performance Computing Spring 2018

MPI 1. CSCI 4850/5850 High-Performance Computing Spring 2018 MPI 1 CSCI 4850/5850 High-Performance Computing Spring 2018 Tae-Hyuk (Ted) Ahn Department of Computer Science Program of Bioinformatics and Computational Biology Saint Louis University Learning Objectives

More information

Supercomputing in Plain English Exercise #6: MPI Point to Point

Supercomputing in Plain English Exercise #6: MPI Point to Point Supercomputing in Plain English Exercise #6: MPI Point to Point In this exercise, we ll use the same conventions and commands as in Exercises #1, #2, #3, #4 and #5. You should refer back to the Exercise

More information

30 Nov Dec Advanced School in High Performance and GRID Computing Concepts and Applications, ICTP, Trieste, Italy

30 Nov Dec Advanced School in High Performance and GRID Computing Concepts and Applications, ICTP, Trieste, Italy Advanced School in High Performance and GRID Computing Concepts and Applications, ICTP, Trieste, Italy Why serial is not enough Computing architectures Parallel paradigms Message Passing Interface How

More information

Introduction to the SHARCNET Environment May-25 Pre-(summer)school webinar Speaker: Alex Razoumov University of Ontario Institute of Technology

Introduction to the SHARCNET Environment May-25 Pre-(summer)school webinar Speaker: Alex Razoumov University of Ontario Institute of Technology Introduction to the SHARCNET Environment 2010-May-25 Pre-(summer)school webinar Speaker: Alex Razoumov University of Ontario Institute of Technology available hardware and software resources our web portal

More information

15-440: Recitation 8

15-440: Recitation 8 15-440: Recitation 8 School of Computer Science Carnegie Mellon University, Qatar Fall 2013 Date: Oct 31, 2013 I- Intended Learning Outcome (ILO): The ILO of this recitation is: Apply parallel programs

More information

MPI 2. CSCI 4850/5850 High-Performance Computing Spring 2018

MPI 2. CSCI 4850/5850 High-Performance Computing Spring 2018 MPI 2 CSCI 4850/5850 High-Performance Computing Spring 2018 Tae-Hyuk (Ted) Ahn Department of Computer Science Program of Bioinformatics and Computational Biology Saint Louis University Learning Objectives

More information

Parallel Programming & Cluster Computing Distributed Multiprocessing

Parallel Programming & Cluster Computing Distributed Multiprocessing Parallel Programming & Cluster Computing Distributed Multiprocessing Henry Neeman, University of Oklahoma Charlie Peck, Earlham College Tuesday October 11 2011 The Desert Islands Analogy Distributed Parallelism

More information

Practical MPI for the Geissler group

Practical MPI for the Geissler group Practical MPI for the Geissler group Anna August 12, 2011 Contents 1 Introduction 1 1.1 What is MPI?............................. 1 1.2 Resources............................... 2 1.3 A tiny glossary............................

More information

Introduction to Parallel Programming with MPI

Introduction to Parallel Programming with MPI Introduction to Parallel Programming with MPI PICASso Tutorial October 25-26, 2006 Stéphane Ethier (ethier@pppl.gov) Computational Plasma Physics Group Princeton Plasma Physics Lab Why Parallel Computing?

More information

Effective Use of CCV Resources

Effective Use of CCV Resources Effective Use of CCV Resources Mark Howison User Services & Support This talk... Assumes you have some familiarity with a Unix shell Provides examples and best practices for typical usage of CCV systems

More information

MPI Message Passing Interface

MPI Message Passing Interface MPI Message Passing Interface Portable Parallel Programs Parallel Computing A problem is broken down into tasks, performed by separate workers or processes Processes interact by exchanging information

More information

Part One: The Files. C MPI Slurm Tutorial - TSP. Introduction. TSP Problem and Tutorial s Purpose. tsp.tar. The C files, summary

Part One: The Files. C MPI Slurm Tutorial - TSP. Introduction. TSP Problem and Tutorial s Purpose. tsp.tar. The C files, summary C MPI Slurm Tutorial - TSP Introduction The example shown here demonstrates the use of the Slurm Scheduler for the purpose of running a C/MPI program Knowledge of C is assumed Code is also given for the

More information

Compilation and Parallel Start

Compilation and Parallel Start Compiling MPI Programs Programming with MPI Compiling and running MPI programs Type to enter text Jan Thorbecke Delft University of Technology 2 Challenge the future Compiling and Starting MPI Jobs Compiling:

More information

Assignment 5 Using Paraguin to Create Parallel Programs

Assignment 5 Using Paraguin to Create Parallel Programs Overview Assignment 5 Using Paraguin to Create Parallel Programs C. Ferner andb. Wilkinson October 15, 2014 The goal of this assignment is to use the Paraguin compiler to create parallel solutions using

More information

COSC 6374 Parallel Computation. Message Passing Interface (MPI ) I Introduction. Distributed memory machines

COSC 6374 Parallel Computation. Message Passing Interface (MPI ) I Introduction. Distributed memory machines Network card Network card 1 COSC 6374 Parallel Computation Message Passing Interface (MPI ) I Introduction Edgar Gabriel Fall 015 Distributed memory machines Each compute node represents an independent

More information

Scientific Programming

Scientific Programming Parallel Paradigms Dirk Colbry, Research Specialist Ins

More information

Supercomputing in Plain English

Supercomputing in Plain English Supercomputing in Plain English Distributed Multiprocessing Henry Neeman Director OU Supercomputing Center for Education & Research November 19 2004 The Desert Islands Analogy Distributed Parallelism MPI

More information

Some PBS Scripting Tricks. Timothy H. Kaiser, Ph.D.

Some PBS Scripting Tricks. Timothy H. Kaiser, Ph.D. Some PBS Scripting Tricks Timothy H. Kaiser, Ph.D. What the??? How did you do that? Normal scripts review (script01) Notifications (script05) Using local disk space (script07) Getting output before the

More information

[4] 1 cycle takes 1/(3x10 9 ) seconds. One access to memory takes 50/(3x10 9 ) seconds. =16ns. Performance = 4 FLOPS / (2x50/(3x10 9 )) = 120 MFLOPS.

[4] 1 cycle takes 1/(3x10 9 ) seconds. One access to memory takes 50/(3x10 9 ) seconds. =16ns. Performance = 4 FLOPS / (2x50/(3x10 9 )) = 120 MFLOPS. Give your answers in the space provided with each question. Answers written elsewhere will not be graded. Q1). [4 points] Consider a memory system with level 1 cache of 64 KB and DRAM of 1GB with processor

More information