Parallel programming in Matlab environment on CRESCO cluster, interactive and batch mode

Similar documents
300x Matlab. Dr. Jeremy Kepner. MIT Lincoln Laboratory. September 25, 2002 HPEC Workshop Lexington, MA

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

Matlab MPI. Shuxia Zhang Supercomputing Institute Tel: (direct) (help)

Numerical and Statistical tools for images analysis. based on the database from Frascati Tokamak Upgrade. Main System Skills

Parallel Matlab: The Next Generation

ENEA, the Italian agency for the energy,

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

Tutorial on MPI: part I

Parallel Matlab: The Next Generation

Batch Systems & Parallel Application Launchers Running your jobs on an HPC machine

Introduction to the Message Passing Interface (MPI)

Batch Systems. Running your jobs on an HPC machine

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

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

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

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:

The Accelerator Toolbox (AT) is a heavily matured collection of tools and scripts

Distributed Simulation in CUBINlab

Calcul intensif et Stockage de Masse. CÉCI/CISM HPC training sessions Use of Matlab on the clusters

CSE. Parallel Algorithms on a cluster of PCs. Ian Bush. Daresbury Laboratory (With thanks to Lorna Smith and Mark Bull at EPCC)

Calcul intensif et Stockage de Masse. CÉCI/CISM HPC training sessions

CSinParallel Workshop. OnRamp: An Interactive Learning Portal for Parallel Computing Environments

arxiv:astro-ph/ v1 6 May 2003

Details and description of Application

Implementing GRID interoperability

Practical Introduction to Message-Passing Interface (MPI)

Getting started with the CEES Grid

LLGrid: On-Demand Grid Computing with gridmatlab and pmatlab

STARTING THE DDT DEBUGGER ON MIO, AUN, & MC2. (Mouse over to the left to see thumbnails of all of the slides)

Batch Systems. Running calculations on HPC resources

Introduction to High-Performance Computing (HPC)

Outline. Communication modes MPI Message Passing Interface Standard. Khoa Coâng Ngheä Thoâng Tin Ñaïi Hoïc Baùch Khoa Tp.HCM

Distributed Memory Parallel Programming

Holland Computing Center Kickstart MPI Intro

MPI Runtime Error Detection with MUST

PPCES 2016: MPI Lab March 2016 Hristo Iliev, Portions thanks to: Christian Iwainsky, Sandra Wienke

Docker task in HPC Pack

Installing and running COMSOL 4.3a on a Linux cluster COMSOL. All rights reserved.

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

Programming Scalable Systems with MPI. Clemens Grelck, University of Amsterdam

Getting Started with Serial and Parallel MATLAB on bwgrid

An Introduction to MPI

LLgrid: Enabling On-Demand Grid Computing With gridmatlab and pmatlab

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

MPI Correctness Checking with MUST

Multi-thread and Mpi usage in GRID Roberto Alfieri - Parma University & INFN, Gr.Coll. di Parma

Számítogépes modellezés labor (MSc)

Survey of Parallel Computing with MATLAB

NUSGRID a computational grid at NUS

CS 426. Building and Running a Parallel Application

pmatlab: Parallel Matlab Toolbox

The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs

Parallel Processing. Majid AlMeshari John W. Conklin. Science Advisory Committee Meeting September 3, 2010 Stanford University

Practical Course Scientific Computing and Visualization

Introduction to parallel computing concepts and technics

Improved Infrastructure Accessibility and Control with LSF for LS-DYNA

SAS Grid Manager and Kerberos Authentication

ECE 574 Cluster Computing Lecture 13

Beginner's Guide for UK IBM systems

Parallel Computing and the MPI environment

COMP528: Multi-core and Multi-Processor Computing

MPI MESSAGE PASSING INTERFACE

Examples of Big Data analytics in ENEA: data sources and information extraction strategies

The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs

Parallel Processing Experience on Low cost Pentium Machines

Fixed Bugs for IBM Platform LSF Version

High Performance Computing Cluster Advanced course

Presented By: Gregory M. Kurtzer HPC Systems Architect Lawrence Berkeley National Laboratory CONTAINERS IN HPC WITH SINGULARITY

Interactive, On-Demand Parallel Computing with pmatlab and gridmatlab

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

Using LSF with Condor Checkpointing

Distributed Memory Programming with Message-Passing

Fast Access to Remote Objects 2.0 A renewed gateway to ENEAGRID distributed computing resources

No Time to Read This Book?

LOAD BALANCING DISTRIBUTED OPERATING SYSTEMS, SCALABILITY, SS Hermann Härtig

MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016

A Message Passing Standard for MPP and Workstations

Introduction to HPC Using zcluster at GACRC

Rapid prototyping of radar algorithms [Applications Corner]

L17: Introduction to Irregular Algorithms and MPI, cont.! November 8, 2011!

Job Management System Extension To Support SLAAC-1V Reconfigurable Hardware

Allinea DDT Debugger. Dan Mazur, McGill HPC March 5,

Parallelizing AT with MatlabMPI. Evan Y. Li

Best practices. Using Affinity Scheduling in IBM Platform LSF. IBM Platform LSF

DDT: A visual, parallel debugger on Ra

Introduction to Parallel Programming with MPI

Testing of PVODE, a Parallel ODE Solver

A Login Shell interface for INFN-GRID

Grid Engine Users Guide. 5.5 Edition

Developing a Thin and High Performance Implementation of Message Passing Interface 1

CISC 879 Software Support for Multicore Architectures Spring Student Presentation 6: April 8. Presenter: Pujan Kafle, Deephan Mohan

Parallel MATLAB at VT

Platform LSF Security. Platform LSF Version 7.0 Update 5 Release date: March 2009 Last modified: March 16, 2009

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

Introduction to HPC Using zcluster at GACRC

Parallel Programming in C with MPI and OpenMP

MPI Runtime Error Detection with MUST and Marmot For the 8th VI-HPS Tuning Workshop

Introduction to OpenMP. OpenMP basics OpenMP directives, clauses, and library routines

The MPI Message-passing Standard Lab Time Hands-on. SPD Course 11/03/2014 Massimo Coppola

Transcription:

Parallel programming in Matlab environment on CRESCO cluster, interactive and batch mode Authors: G. Guarnieri a, S. Migliori b, S. Podda c a ENEA-FIM, Portici Research Center, Via Vecchio Macello - Loc. Granatello - 80055 Portici (Naples) b ENEA-FIM, Enea-Sede, Lungotevere Thaon di Revel n. 76, 00196 Roma, c ENEA-FIM, Frascati Research Center, Via E. Fermi 45, 00044 Frascati (Roma) Introduction Matlab (MATrix LABoratory) provides an environment for numeric elaboration and an interpreted programming language widely used in science and technology. The package is equipped with specialized libraries (toolboxes) which can solve problems in several fields. For some years the implementation of parallel programming in Matlab environment has been under study. Mathworks, the producer of Matlab, distributes toolboxes with this target, but there are also third party projects with the same aim. Among them is the MatlabMPI library developed by Lincoln Laboratories of the Massachusetts Institute of Technology. ENEA GRID, by the introduction of CRESCO machines, has achieved a very high computational power. So, the possibility of parallel programming in Matlab on this structure becomes a meaningful aim. We have chosen to modify and install the MatlabMPI library for Linux machines of ENEA GRID and particularly for CRESCO cluster. This functions library, written in pure Matlab language, implements a subset of the functions defined in the MPI standard and allows to run, at the same time, several Matlab processes both on multicore machines and computer clusters. Data exchange among the processes does not happen by real message sending and receiving, but via file system access operations. Some code changes were required to install MatlabMPI on ENEA GRID and to adapt the use of the library to CRESCO submission mode. To enable the launching of Matlab jobs on remote machines in interactive such as in batch mode we have resorted to the ENEA GRID submission tool. The use of this library along with the multithreading programming mode on multicore nodes, enabled in latest versions of Matlab, also permit to enforce a hybrid programming mode on CRESCO cluster. The user can exploit the parallelism assured by multithreading on multicore nodes and implement the communication among the nodes with MatlabMPI. MatlabMPI. ("Parallel Programming with MatlabMPI", Jeremy Kepner, Proceedings of the High Performance Embedded Computing (HPEC 2001) workshop, 25-27 Sep 2001, MIT Lincoln Laboratory, Lexington, MA). MatlabMPI library contains the following items: MPI_Run MPI_Init MPI_Comm_size MPI_Comm_rank MPI_Send MPI_Recv MPI_Finalize MPI_Abort MPI_Bcast MPI_Probe MPI_cc MatMPI_Comm_dir MatMPI_Save_messages MatMPI_Delete_all MatMPI_Comm_settings MatMPI_Buffer_file MatMPI_Lock_file MatMPI_Commands MatMPI_Comm_init MatlabMPI: Message exchange. The send operation consists of storing the data to send in a file in a common directory that all processes can access. The name of this file contains the information about the message to exchange, the sending process and the receiving one. The receive operation, instead, consists of detecting the file from which to load the message by means of the information contained in its name, of waiting for the end of send operation and finally of loading the data with a reading operation. Fig.2. How to launch in interactive mode a session with MatlabMPI on ENEA GRID machines. MatlabMPI on CRESCO cluster. CRESCO HPC system consists of more than 2700 cores, divided into three main sections. This cluster has been integrated in ENEA GRID. The main software components are the LSF scheduler, the openafs distributed file system and the integrated Kerberos 5 authentication. There are eight front-end nodes by which users can access the system and submit their jobs on computational nodes. In order to adapt MatlabMPI library to submit jobs on CRESCO cluster in batch mode it was necessary to further modify the code. We have created some scripts to interface the library with the scheduler environment. Sender Process Receiver Process Send operations Receive operations MPI_Send MPI_Recv Data File Variable Save operation Common file system Load operation Variable Fig.3. How to launch in batch mode a session with MatlabMPI on CRESCO cluster from a front-end command line. We submit with bsub command the script matmpilauncher.sh on the default queue small_10m. Fig.1. Graphic description of a message exchange between two parallel Matlab processes using MatlabMPI functions MPI_Send and MPI_Recv. matmpilaucher.sh LSF Scheduled Resources Since the library consists of pure Matlab code, it s possibile to use it involving heterogeneous sets of platforms as long as they support Matlab environment. On a shared memory system a single licence is enough to use all available cores, whereas on distributed memory systems the user needs a licence for every engaged node. However it is possibile to compile Matlab scripts with the mcc command, in this way only one Matlab licence is enough on distributed memory systems too. MatlabMPI on ENEA GRID. ENEA GRID is based on AFS distributed fyle system, which allows users to access their home directory from every point of the grid. This supports the use of MatlabMPI because the parallel Matlab processes can simply share a common working directory. The library is presently installed on ENEA GRID and it s available for all Linux machines and for the following Matlab releases: 1) 7.0.1 24704 (R14) 2) R2007a 3) R2008a We have modified in some points the original code to adapt the use of MatlabMPI to our computational grid. Primarily, to enable the launching of Matlab jobs on remote machines, allowing them to access the AFS file system without losing reading and writing permissions, or to be more precise to ensure token preservation for the user, we have resorted to the ENEA-GRID submission tool. Moreover, in ENEA there are a limited number of Matlab licences and therefore at run time the number of available ones may be insufficient to launch all required Matlab processes, this could cause an error in the elaboration that MatlabMPI cannot detect. We have introduced a shell script that checks the number of available Matlab licences; if this number is insufficient the program exits with an appropriate error message. This script is called by MPI_Run before the stage of processes spawning. MPI_Run function was also modified in order to detect the version of Matlab that is in use and to check the number of available licences for the appropriate version. In this way the user can avoid the risk of creating pending processes with subsequent deadlock errors. References. http://www.mathworks.com http://www.ll.mit.edu/matlabmpi/ http://www.ll.mit.edu/pmatlab/ MATLAB matmpiscript.m MatlabMPI + blaunch.sh Fig.4. The script matmpilauncher.sh reads some LSF environmental variables in which are contained the scheduled resources for the request expressed in the command line of Fig.3 and launch Matlab with the M-File matmpiscript.m. The latter passes the scheduled resources as argument to MatlabMPI functions. In batch mode the launch of the parallel Matlab jobs happens by means of blaunch command. Hybrid programming mode on CRESCO cluster - MatlabMPI+. MatlabMPI Fig.5. As the CRESCO architecture is distributed with multicore nodes the best parallel programming style is the hybrid one. This technique combines together multithreading on shared memory machines and message passing for comunication among nodes. The latest Matlab versions enable multithreading on a single multicore node thus the MatlabMPI library fully exploits the CRESCO capabilities.

Fig.3 Benefits of multicluster queue.

ENEA-FIM, C.R. Portici

References http://www.cresco.enea.it/la1/cresco_ sp12_graf3d/