Matlab on a Supercomputer

Similar documents
Introduction to Supercomputing with Janus

SLURM Workload Manager

Introduction to Running Computations on the High Performance Clusters at the Center for Computational Research

Linux für bwgrid. Sabine Richling, Heinz Kredel. Universitätsrechenzentrum Heidelberg Rechenzentrum Universität Mannheim. 27.

Parallel Computing using MATLAB Distributed Compute Server ZORRO HPC

An introduction to compute resources in Biostatistics. Chris Scheller

The Asterope compute cluster

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

SLURM: Resource Management and Job Scheduling Software. Advanced Computing Center for Research and Education

SLURM: Resource Management and Job Scheduling Software. Advanced Computing Center for Research and Education

Bringing Big Data Modelling into the Hands of Domain Experts

Until now: tl;dr: - submit a job to the scheduler

bwgrid Treff MA/HD Sabine Richling, Heinz Kredel Universitätsrechenzentrum Heidelberg Rechenzentrum Universität Mannheim 29.

HPC Wales Skills Academy Course Catalogue 2015

Using WestGrid. Patrick Mann, Manager, Technical Operations Jan.15, 2014

Introduction to parallel computing and UPPMAX

Tutorial-4a: Parallel (multi-cpu) Computing

High-Performance Computing

Introduction to Matlab Distributed Computing Server (MDCS) Dan Mazur and Pier-Luc St-Onge December 1st, 2015

HPC at IU Overview. Abhinav Thota Research Technologies Indiana University

Parallel Debugging with DDT

General Overview. Slurm Training15. Alfred Gil & Jordi Blasco (HPCNow!)

An Introduction to High Performance Computing in the Department

Beyond Windows: Using the Linux Servers and the Grid

Martinos Center Compute Clusters

Tackling Big Data with MATLAB Adam Filion Application Engineer MathWorks, Inc.

Grid Engine Basics. Table of Contents. Grid Engine Basics Version 1. (Formerly: Sun Grid Engine)

2015 The MathWorks, Inc. 1

Work Environment. David Tur HPC Expert. HPC Users Training September, 18th 2015

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

Miami University RedHawk Cluster Working with batch jobs on the Cluster

Biowulf2 Training Session

locuz.com HPC App Portal V2.0 DATASHEET

Overview of HPC Resources at Vanderbilt

Parallel Computing with Mathematica UVACSE Short Course

Solving Big Data Problems in Computer Vision with MATLAB Loren Shure

How to Run Parallel Jobs Efficiently

The RWTH Compute Cluster Environment

Parallel Processing using the LOTUS cluster

Streamline Computing Linux Cluster User Training. ( Nottingham University)

Using the Yale HPC Clusters

Running applications on the Cray XC30 4/12/2015

Introduction to Running Hadoop on the High Performance Clusters at the Center for Computational Research

Debugging and Profiling Lab. Carlos Rosales, Kent Milfeld and Yaakoub Y. El Kharma

10- High Performance Compu5ng

Using NeSI HPC Resources. NeSI Computational Science Team

Remote & Collaborative Visualization. Texas Advanced Compu1ng Center

Parallel Programming for Multi-Core, Distributed Systems, and GPUs Exercises

Introduction to Sun Grid Engine (SGE)

Introduction to HPC Workshop. Center for e-research

Hodor and Bran - Job Scheduling and PBS Scripts

GRID Computing: CAS Style

Chapter 2: Getting Started

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Calcul Parallèle sous MATLAB

Managing GPUs by Slurm. Massimo Benini HPC Advisory Council Switzerland Conference March 31 - April 3, 2014 Lugano

HPC-Nutzer Informationsaustausch. The Workload Management System LSF

Grid 101. Grid 101. Josh Hegie.

1.0. User Manual For HPC Cluster at GIKI. Volume. Ghulam Ishaq Khan Institute of Engineering Sciences & Technology

NEC HPC-Linux-Cluster

Submitting batch jobs Slurm on ecgate. Xavi Abellan User Support Section

MFCF Grad Session 2015

Parallel Options for R

MSU Tier 3 Usage and Troubleshooting. James Koll

Debugging with TotalView

Speeding up MATLAB and Simulink Applications

Getting Started with HPC

Provisioning and Resource Management at Large Scale (Kadeploy and OAR)

Running on Blue Gene/Q at Argonne Leadership Computing Facility (ALCF)

Informationsaustausch für Nutzer des Aachener HPC Clusters

Microsoft Compute Clusters in High Performance Technical Computing. Björn Tromsdorf, HPC Product Manager, Microsoft Corporation

High Performance Computing

The CNMS Computer Cluster

Slurm License Management

LSKA 2010 Survey Report Job Scheduler

Introduction to Big Data Analysis for Scientists and Engineers

Performance Analysis and Optimization Tool

UMass High Performance Computing Center

Computational infrastructure for NGS data analysis. José Carbonell Caballero Pablo Escobar

SURFsara HPC Cloud Workshop

Parallel Computing: Strategies and Implications. Dori Exterman CTO IncrediBuild.

Parallel Computing with MATLAB

Quick Tutorial for Portable Batch System (PBS)

Parallel and Distributed Computing Programming Assignment 1

High Performance Computing Facility Specifications, Policies and Usage. Supercomputer Project. Bibliotheca Alexandrina

Installing and running COMSOL on a Linux cluster

Using Parallel Computing to Run Multiple Jobs

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

MAQAO Performance Analysis and Optimization Tool

Mitglied der Helmholtz-Gemeinschaft. System monitoring with LLview and the Parallel Tools Platform

Transcription:

Matlab on a Supercomputer Shelley L. Knuth Research Computing April 9, 2015

Outline Description of Matlab and supercomputing Interactive Matlab jobs Non-interactive Matlab jobs Parallel Computing Slides available at h0p://researchcompu7ng.github.io/meetup_spring_2015/ 2

What Is Matlab? A high performance tool for technical computing Integrates computation, visualization, and programming Analyze data, develop algorithms, create applications www.mathworks.com Uses many specialized toolboxes to make our lives easier Used by many in the sciences, engineering, math Academia and industry 3

What Is a Supercomputer? One large computer made up of many smaller computers and processors Each different computer is called a node Each node has processors/cores Carry out the instructions of the computer With a supercomputer, all these different computers talk to each other through a communications network 4

Janus Supercomputer 1368 nodes, 16,000+ cores Resource available to all of CU RC environment has login, compile, and compute nodes Login nodes Virtual machine Presents a development environment Where you land when you log in Used for: Editing scripts Job submission 5

Janus Supercomputer Compile nodes Used for: Compiling/installing software Compiling large programs Nodes on Janus that have the same setup as computational nodes Hardware and software Compute nodes Where jobs are run Jobs are scheduled to run on the compute nodes via a scheduler 6

Setting up to run Matlab Different than running Matlab on your local machine Must login, set environment to run Login: ssh X knuths@login.rc.colorado.edu Enter password: 4-digit PIN + OTP number Setting environment up to run Matlab: module load matlab 7

How to Run Matlab Once you have your environment set up to run Matlab, there are two main ways you can run Matlab Interactively In the background We will examine both methods, and their pros and cons 8

Interactive Matlab Interactive means working with software where you input commands and the software gives a response One common mistake people make is to login, be on a login node, and then type matlab Similar to how they would run it on their laptop This is a great example of WHAT NOT TO DO Login nodes are a shared resource Running software that requires a lot of resources can impact other s usability of the node 9

Batch job submission Matlab can also be run interactively through a batch job Achieves the same effect, more efficient Batch jobs are scheduled to run on a supercomputer once the required resources are available and after it is your turn in the queue RC uses SLURM to submit/schedule jobs Common commands: sbatch sinteractive salloc 10

Interactive Batch Jobs - Matlab To submit a batch job to run Matlab interactively: Request CPU time on the compute nodes Wait for this the resources to become available Open Matlab Do your thing! Interactive batch jobs are mainly used for Debugging Short job runs 11

Submission Interactive Batch Jobs To submit an interactive batch job on Janus, do the following: module load matlab (described earlier) module load slurm Then to request compute time, either use: salloc sinteractive 12

Salloc vs. Sinteractive Both are SLURM commands salloc Use this if you don t need X11 forwarding If you don t need the GUI sinteractive Use this if you do need X11 forwarding salloc --qos=janus-debug sinteractive --qos=janus-debug 13

Length Interactive Batch Jobs NEVER run for a long time Your job will start when resources become available This could be at 2 am Want job to start asap Ask for as few resources as possible Small wall-time Good for the janus-debug queue Keeps you to under 1 hour 14

Interactive Batch Jobs Once salloc or sinteractive runs salloc --qos=janus-debug And resources become available you are granted a job allocation on a node salloc: Granted job allocation 602576 (output) Once this comes on the screen your compute allocation is being used If you type hostname you will be told which node you are on bash-4.1$ hostname node0211 15

Interactive Matlab Now you can run Matlab matlab If you use salloc you will get Matlab without the GUI If you use sinteractive you will get Matlab with the GUI Let s try it! One thing to remember you are burning compute time If finish earlier than time asked for type exit! 16

Non-Interactive Batch Jobs Submit job that will be executed when resources are available Create a text file containing information about the job Or submit on the command line Submit the job file to a queue sbatch! 17

Batch Job example Contents of scripts Matlab_tutorial_general.sh Wrapper script loads the slurm commands Changes to the appropriate directory Calls the matlab.m files Matlab_tutorial_general_code.m Run matlab program as a batch job sbatch matlab_tutorial_general.sh Check job status: squeue q janus-debug cat SERIAL.out 18

Parallel Processing In parallel processing we use several CPUs to solve one problem One node with several cores Several nodes with many cores Embarrassingly parallel Source: h0ps://compu7ng.llnl.gov/tutorials/parallel_comp/ 19

Parallel Computing Toolbox (PCT) Additional toolbox as part of Matlab Perform parallel computations on multicore computers, GPUs, and computer clusters Allows you to parallelize Matlab code without MPI programming Many Matlab functions work in concert with the PCT Simple to utilize with just the use of certain commands 20

Parallel and Not Parallel Not Parallel: for i=1:10 x=x(i)+1; end Parallel: matlabpool open 3 parfor i=1:10 x=x(i)+1; end matlabpool close 21

Running Matlab in Parallel Workers: copies of the original client created to assist in computation 22

Running Matlab in Parallel On Janus at CU can run up to 12 workers on one node Used to be able to only run one Matlab job at a time Now can run as many as you want Can also run as many workers on the high memory nodes 23

parfor Easy to use Allows parallelism in terms of loops When client reaches a parfor loop iterations of loop are automatically divided up among workers Parfor requires results be completely independent Cannot determine how loops are divided 24

Running Matlab in Parallel On Lots of Cores Typically see a significant speed up when using parfor vs. when not If code is parallelizable However, this might not always be the case Might spend more time in overhead If code isn t parallelizable If code isn t that complicated 25

Spmd Command Single process, multiple data The spmd command ensures more control Can parallelize much more than just loops Like a very simplified version of MPI More flexibility than parfor However, need to know what you re doing 26

Distributed Computing Toolbox PCT allows you to run programs in parallel across many processors DCT allows you to run across nodes Allows you to run easily on clusters Supports resource managers Not an option for Janus 27

Questions? shelley.knuth@colorado.edu 28