Aamir Shafi, Bryan Carpenter, Mark Baker

Slides:



Advertisements
Similar presentations
Parallel Processing with OpenMP
Advertisements

Types of Parallel Computers
Programming Parallel Hardware using MPJ Express
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Introduction to Java Lab CS110A – Lab Section 004 Instructor: Duo Wei.
1 Parallel Computing—Introduction to Message Passing Interface (MPI)
High Performance Communication using MPJ Express 1 Presented by Jawad Manzoor National University of Sciences and Technology, Pakistan 29 June 2015.
Installing and running COMSOL on a Windows HPCS2008(R2) cluster
Parallel Programming with Java
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
Using Ant to build J2EE Applications Kumar
IB Computer Science II Paul Bui
Anders Karlsson Principal Sales Engineer, MySQL MySQL Embedded - Getting started with libmysqld.
Parallel Programming with Java YILDIRAY YILMAZ Maltepe Üniversitesi.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
OpenMP in a Heterogeneous World Ayodunni Aribuki Advisor: Dr. Barbara Chapman HPCTools Group University of Houston.
1 Developing Native Device for MPJ Express Advisor: Dr. Aamir Shafi Co-advisor: Ms Samin Khaliq.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Guideline: How to build AMSS source code? History: 01/02/ Make Draft 05/02/2010 – Release /02/2010 – Updated.
Operating Systems & Information Services CERN IT Department CH-1211 Geneva 23 Switzerland t OIS Working with Windows 7 at CERN Michał Budzowski.
Parallel Programming Dr Andy Evans. Parallel programming Various options, but a popular one is the Message Passing Interface (MPI). This is a standard.
Citrix MPS 3.0 Licensing Douglas A. Brown President
Java Spring PImage Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
IBM TSpaces Lab 1 Introduction. Summary TSpaces Overview Basic Definitions Basic primitive operations Reading/writing tuples in tuplespace HelloWorld.
MPJ Express Alon Vice Ayal Ofaim. Contributors 2 Aamir Shafi Jawad Manzoor Kamran Hamid Mohsan Jameel Rizwan Hanif Amjad Aziz Bryan Carpenter Mark Baker.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
School of Electrical Engineering & Computer Science National University of Sciences & Technology (NUST), Pakistan Research Profile Aamir Shafi.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
Computing Simulation in Orders Based Transparent Parallelizing Pavlenko Vitaliy Danilovich, Odessa National Polytechnic University Burdeinyi Viktor Viktorovych,
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
CS7 Recitation Cem Akkaya. Outline  Homework-0 in detail  Useful links and tools  Setting up your java environment.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
1 Running MPI on “Gridfarm” Bryan Carpenter February, 2005.
3/12/2013Computer Engg, IIT(BHU)1 PARALLEL COMPUTERS- 1.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
ITP 109 Week 2 Trina Gregory Introduction to Java.
Operating Environment. Installation and Upgrade Options Solaris suninstall program Solaris Web Start Installation Custom Jumpstart procedure Standard.
Programming Parallel Hardware using MPJ Express By A. Shafi.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
Constructing a system with multiple computers or processors 1 ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson. Jan 13, 2016.
A+ Guide to Managing and Maintaining Your PC, 7e Chapter 2 Introducing Operating Systems.
Day 1 Session 2. Setup & Installation
Introduction to threads
The need for Programming Languages
Hadoop Architecture Mr. Sriram
Introduction to Java Dept. Business Computing University of Winnipeg
MPJ: The second generation ‘MPI for Java’
Pluggable Architecture for Java HPC Messaging
Chapter 2: System Structures
HPML Conference, Lyon, Sept 2018
Constructing a system with multiple computers or processors
MPJ: A Java-based Parallel Computing System
IB Computer Science II Paul Bui
Types of Parallel Computers
Presentation transcript:

Aamir Shafi, Bryan Carpenter, Mark Baker MPJ Express: An Implementation of MPI in Java Version: 0.35 (Beta Release) Aamir Shafi, Bryan Carpenter, Mark Baker aamir.shafi@seecs.edu.pk, bryan.carpenter@port.ac.uk, mark.baker@computer.org 4/15/2017 http://mpj-express.org

The current release contains: Introduction MPJ Express is a message passing library that be can be used by the application developers to develop and execute parallel Java applications on compute clusters or network of computers. MPJ Express is originally designed for distributed memory machines like clusters but also supports efficient execution of parallel applications on desktops or laptops that contain shared memory or multicore processors MPJ Express is a reference implementation of mpiJava 1.2 API, which is an MPI-like API for Java defined by the Java Grande Forum The current release contains: The core library The runtime infrastructure The test-suite 4/15/2017 http://mpj-express.org

MPJ Express Configurations MPJ Express can be configured in two ways: Multicore Configuration: This configuration is used by developers who want to execute their parallel Java applications on multicore or shared memory machines (laptops and desktops). Cluster Configuration: This configuration is used by developers who want to execute their parallel Java applications on distributed memory platforms including clusters and network of computers. 4/15/2017 http://mpj-express.org

Multicore Configuration The users can use multicore device driver (also known as shared memory device driver) in the multicore configuration Main Memory CPU 0 CPU 1 CPU 2 CPU 3 Proc 0 Proc 1 Proc 2 Proc 3 Fig1: MPJ Express executing in the multicore configuration with four threads on a quad core processor 4/15/2017 http://mpj-express.org

Advantages of Multicore Configuration Incremental Development: Users can first develop parallel applications on desktops/laptops using multicore configuration and then take the same code to distributed memory platforms including clusters Teaching Purposes: This configuration is preferred for teaching purposes since students can execute message passing code on their personal computers Debugging and Profiling: IDEs like Eclipse can be used for easier debugging and profiling 4/15/2017

Cluster Configuration Application developers can opt to use either of the two communication drivers in the cluster configuration Java NIO Device Driver (niodev) It can be used to execute MPJ Express programs on Ethernet-based interconnects. Myrinet Device Driver (mxdev): Many clusters today are equipped with high performance low latency networks like Myrinet. Lets consider a cluster comprising of 8 compute nodes. Every process is started on different node while running code with Cluster Configuration, depending upon the machines file 1 2 3 4 5 6 7 Fig2: MPJ Express executing in the cluster configuration with 8 processes on a cluster with 8 compute nodes 4/15/2017 http://mpj-express.org

MPJ Express Installation (UNIX/Linux/Mac) Pre-requisites Java 1.5 (stable) or higher Apache ant 1.6.2 or higher (Optional) Perl (Optional) Running MPJ Express Programs in the Multicore Configuration Download MPJ Express and unpack it. Set MPJ_HOME and PATH environmental variables: export MPJ_HOME=/path/to/mpj/ export PATH=$PATH:$MPJ_HOME/bin (These above two lines can be added to ~/.bashrc) Write your MPJ Express program (HelloWorld.java) and save it. Compile: javac -cp.:$MPJ_HOME/lib/mpj.jar HelloWorld.java Execute: mpjrun.sh -np 4 HelloWorld.java 4/15/2017 http://mpj-express.org

MPJ Express Installation (UNIX/Linux/Mac) Cont’d Running MPJ Express Programs in the Cluster Configuration Download MPJ Express and unpack it. Set MPJ_HOME and PATH environmental variables: export MPJ_HOME=/path/to/mpj/ export PATH=$PATH:$MPJ_HOME/bin (These above two lines can be added to ~/.bashrc) Write a machines file (name it “machines”) stating hostnames or IP addresses of all the machines involved in the parallel execution Write your MPJ Express program (HelloWorld.java) and save it. Start Daemons: mpjboot machines Compile: javac -cp.:$MPJ_HOME/lib/mpj.jar HelloWorld.java Execute: mpjrun.sh -np 4 HelloWorld.java Stop daemons: mpjhalt machines 4/15/2017 http://mpj-express.org

MPJ Express Installation (Windows) Pre-requisites Java 1.5 (stable) or higher Apache ant 1.6.2 or higher (Optional) Perl (Optional) Running MPJ Express Programs in the Multicore Configuration 1. Download MPJ Express and unpack it. 2. Set MPJ_HOME and PATH environmental variables. Right-click My Computer->Properties->Advanced tab->Environment Variables and export the following system variables (User variables are not enough) Set the value of MPJ_HOME = c:\mpj (assuming mpj is in c:\ Append the c:\mpj\bin directory to the PATH variable Cygwin on Windows: (assuming mpj is 'c:\mpj‘): The recommended way to is to set variables as in Windows. If you want to set variables in cygwin shell export MPJ_HOME="c:\\mpj“ export PATH=$PATH:"$MPJ_HOME\\bin" 4/15/2017 http://mpj-express.org

MPJ Express Installation (Windows) Cont’d Write your MPJ Express program (HelloWorld.java) and save it. Compile: javac -cp.:$MPJ_HOME/lib/mpj.jar HelloWorld.java Execute: mpjrun.bat -np 4 HelloWorld.java For running MPJ Express programs in the cluster configuration, refer to the $MPJ_HOME/README-win.txt and $MPJ_HOME/doc/windowsguide.pdf 4/15/2017 http://mpj-express.org

Writing Programs with MPJ Express A sample Program with MPJ Express is   Save this Program as HelloWorld.java import mpi.*; public class HelloWorld { public static void main(String args[]) throws Exception { MPI.Init(args); int me = MPI.COMM_WORLD.Rank(); int size = MPI.COMM_WORLD.Size(); System.out.println("Hi from <"+me+">"); MPI.Finalize(); } 4/15/2017 http://mpj-express.org

Executing MPJ Express Programs Compiling UNIX/Linux/Mac: javac –cp .:$MPJ_HOME/lib/mpj.jar HelloWorld.java Windows: javac –cp .:%MPJ_HOME%/lib/mpj.jar HelloWorld.java Running with Multicore Configuration UNIX/Linux/Mac: mpjrun.sh –np <no. of processors> HelloWorld.java Windows: mpjrun.bat –np <no. of processors> HelloWorld.java Running with Cluster Configuration Start the daemons UNIX/Linux/Mac: mpjrun.sh –np <no. of processors> -dev niodev HelloWorld Windows: mpjrun.bat –np <no. of processors> -dev niodev HelloWorld 4/15/2017 http://mpj-express.org

Executing Programs with MPJ Express on UNIX/Linux/Mac Multicore Configuration Cluster Configuration Add Snapshots …. First show snapshots for multicore: 1. Logged onto my laptop, which has for example (a quad-core) 2. Execute … 3. and Explain with previous figure how processes are running … 4/15/2017 http://mpj-express.org

Executing Programs with MPJ Express on Windows Multicore Configuration Cluster Configuration Add Snapshots …. First show snapshots for multicore: 1. Logged onto my laptop, which has for example (a quad-core) 2. Execute … 3. and Explain with previous figure how processes are running … 4/15/2017 http://mpj-express.org

Additional Runtime Arguments The mpjrun.[sh/bat] script accepts some additional arguments which can be passed according to the user preferences. Some of them are np switch: If a value is specified, then MPJ Express starts those many processes for the user application. It can be specified like mpjrun.[sh/bat] –np 2 ProgramName. dev switch: This switch can be given at runtime to change to the appropriate device driver. It can be used as mpjrun.[sh/bat] –dev multicore/niodev/mxdev ProgramName. machinesfile switch: While running programs, MPJ Express runtime expects a file with name “machines” in the current directory. User can also specify a machines file with different name using machinesfile switch as mpjrun.[sh/bat] machinesfile myFile ProgramName wdir switch: If your programs reads some file, then it may be a good idea to separate this file from your application classes, or copy it to a tmp directory and specify this tmp directory as working directory using -wdir switch. 4/15/2017 http://mpj-express.org

Manuals and Help Resources Windows Linux README (Quick Start Guide) $MPJ_HOME/README-win.txt $MPJ_HOME/README User Guide $MPJ_HOME/doc/windowsguide.pdf $MPJ_HOME/doc/linuxguide.pdf Visit MPJ Express (http://mpj-express.org) for more details. 4/15/2017 http://mpj-express.org

Contact and Support MPJ Express Users Mailing List (http://www.lists.rdg.ac.uk/mailman/listinfo/mpj-user) Alternatively, the users can contact us directly by email. Aamir Shafi (aamir.shafi@seecs.edu.pk) Bryan Carpenter (bryan.carpenter@port.ac.uk) Mark Baker (mark.baker@computer.org) 4/15/2017

Contributors Aamir Shafi Jawad Manzoor Kamran Hamid Mohsan Jameel Bryan Carpenter Mark Baker Hong Ong Guillermo Taboada Sabela Ramos 4/15/2017 http://mpj-express.org

Acknowledgements The project partners received a generous grant from the British Council under the PMI2 Connect program (http://www.britishcouncil.org/learning-pmi2-connect.htm) Project Title: CollAborative Multicore Programming Using Scientific Java Messaging Project Start Date: September 2008 Duration: 2 Years 4/15/2017 http://mpj-express.org 19