Parallel computation with R & Python on TACC HPC server

Slides:



Advertisements
Similar presentations
NGS computation services: API's,
Advertisements

Lab III – Linux at UMBC.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Batch Process Overview. Batch Processes 2 What Do You Mean By Batch Processing? Allows for Mass Entry of Data All Processing of the Data Happens Without.
Welcome to Electronic Medical Record (EMR) Training How to log in into the EMR Objective This module will provide an quick tutorial of the login process.
HPCC Mid-Morning Break Interactive High Performance Computing Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery.
DIRAC API DIRAC Project. Overview  DIRAC API  Why APIs are important?  Why advanced users prefer APIs?  How it is done?  What is local mode what.
Agenda What is Computer Programming? The Programming Process
ITCS 6/8010 CUDA Programming, UNC-Charlotte, B. Wilkinson, Jan 22, 2011assignprelim.1 Assignment Preliminaries ITCS 6010/8010 Spring 2011.
Introduction to UNIX/Linux Exercises Dan Stanzione.
HORIZONT 1 TWS/WebAdmin The Web Interface for TWS Release Notes HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89 / 540.
ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson, 2012, Jan 18, 2012assignprelim.1 Assignment Preliminaries ITCS 4145/5145 Spring 2012.
NAMS Account Activation Training. 2 What is NAMS? The NASA Account Management System is NASA’s centralized process for requesting and maintaining accounts.
HPC at HCC Jun Wang Outline of Workshop1 Overview of HPC Computing Resources at HCC How to obtain an account at HCC How to login a Linux cluster at HCC.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
17-April-2007 High Performance Computing Basics April 17, 2007 Dr. David J. Haglin.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
ONLY 5 basic steps for Unit Ordering! 1.Login to the system 2.Click on the ORDERS menu along the top 3.Under “Popcorn” click on “Unit Order for Take Order”
HPC for Statistics Grad Students. A Cluster Not just a bunch of computers Linked CPUs managed by queuing software – Cluster – Node – CPU.
Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps.
Unix Machine In Computer Science for Teaching Cliff Zou Spring 2015.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
Turning in Assignments on Engrade Visual Tutorial By Mrs. Rissa Rinde.
Introduction to HPC Workshop October Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
Remote & Collaborative Visualization. TACC Remote Visualization Systems Longhorn – Dell XD Visualization Cluster –256 nodes, each with 48 GB (or 144 GB)
Advanced topics Cluster Training Center for Simulation and Modeling September 4, 2015.
CPSC 233 Tutorial 01 & 05 Jan 19 Edwin Chan. ■“Office”: ICT 524 –Please me ■Continuous Tutorial: Thursdays, 12-2PM (outside MS.
+ Vieques and Your Computer Dan Malmer & Joey Azofeifa.
Introduction to HPC Workshop March 1 st, Introduction George Garrett & The HPC Support Team Research Computing Services CUIT.
NREL is a national laboratory of the U.S. Department of Energy, Office of Energy Efficiency and Renewable Energy, operated by the Alliance for Sustainable.
PuTTY Introduction to Web Programming Kirkwood Continuing Education by Fred McClurg © Copyright 2016, All Rights Reserved ssh client.
An Brief Introduction Charlie Taylor Associate Director, Research Computing UF Research Computing.
Advanced Computing Facility Introduction
Linux & Joker – An Introduction
Interacting with the cluster ssh, sftp, & slurm batch scripts
Hands on training session for core skills
GRID COMPUTING.
Auburn University
First Day in Lab Making a C++ program
Logging Into Windows XP for first time (labs only!)
Welcome to Indiana University Clusters
Introduction to Operating Systems
Assumptions What are the prerequisites? … The hands on portion of the workshop will be on the command-line. If you are not familiar with the command.
WikID installation/training
How to use the HPCC to do stuff
Getting Started with R.
Introduction to SAS on acs-linux (via Xwin32)
Hodor HPC Cluster LON MNG HPN Head Node Comp Node Comp Node Comp Node
CCN sFTP Reporting Guide for Partners
Assignment Preliminaries
Creating Programs on UNIX
Postdoctoral researcher Department of Environmental Sciences, LSU
File Transfer Olivia Irving and Cameron Foss
Introduction to eXtreme Science and Engineering Discovery Environment (XSEDE): Comet and Jetstream Sharon Solis Research Computing Consultant Enterprise.
Telnet/SSH Connecting to Hosts Internet Technology.
Introduction to HPC Workshop
Linux + Galaxy Server Tutorial
Parallel computation with R on TACC HPC server
College of Engineering
CCR Advanced Seminar: Running CPLEX Computations on the ISE Cluster
Getting Started: Amazon AWS Account Creation
High Performance Computing in Bioinformatics
Parallel computation with R & Python on TACC HPC server
Step 3: You will see this page
MPI MPI = Message Passing Interface
Lab 1: Getting Started.
CSCE 206 Lab Structured Programming in C
Working in The IITJ HPC System
Getting Started: Accessing Our Amazon AWS Server
Presentation transcript:

Parallel computation with R & Python on TACC HPC server NSF REU site at UNCW, 2017-2019 Parallel computation with R & Python on TACC HPC server Dr. Cuixian Chen, 10/12/2017 Declaimer: This PPT is modified based on Dr. Yishi Wang’s HPC tutorial on 9/21/2017. Modified from Dr. Patricia Kelley, 06/13/2017

Overview on HPC with R and Python Online resources: https://www.cac.cornell.edu/education/training/StampedeJan2017/Python_R_HPC_Workshop.pdf https://cvw.cac.cornell.edu/python/hpp

follow the instruction for system setups NSF REU site at UNCW, 2017-2019 For first time users: follow the instruction for system setups Modified from Dr. Patricia Kelley, 06/13/2017

Login to your TACC account, as a first-time user https://portal.tacc.utexas.edu/

Login to your TACC account, as a first-time user

Login to your TACC account, as a first-time user https://portal.tacc.utexas.edu/tutorials/multifactor-authentication

Login to your TACC account, as a first-time user Please follow the instruction to obtain the valid Token and get ready for the next step.

Logins and file transferring into Xsede NSF REU site at UNCW, 2017-2019 Logins and file transferring into Xsede Modified from Dr. Patricia Kelley, 06/13/2017

Log into TACC – From Windows From Computer Lab desktops: search for putty From personal Windows laptops: Install and open Putty. Hostname: stampede2.tacc.utexas.edu Saved Sessions: give a name for the future use, such as Stampede2.

Log into TACC – From Windows From Computer Lab desktops: search for putty From personal Windows laptops: Install and open Putty. Username: Use the one such as tg****** Eg: For Chen is tg842131 Then use the same password with your Xsede account. Input your valid Token for the login here.

Log into TACC – From Windows If you can log in successfully, you will see the following message:

Log into TACC – From Mac Start Terminal in Mac; Or you can use xshell from Windows;

Log into TACC – From Mac

To transfer files into Xsede systems To transfer files, use Cyberduck for mac. For windows, you can consider: Xftp5 Winscp (chen’s option) Filezilla

Use Winscp To transfer files into Xsede 1) Hostname: Stampede2.tacc.utexas.edu 2) Username: Use the one such as tg****** Eg: For Chen is tg842131 3) Then use the same password with your Xsede account. 4) Input your valid Token for the login here.

Use Winscp To transfer files into Xsede Once you log into the system: Now you are able to transfer files between your computer and the Xsede system.

Use Cyberduck for mac To transfer files into Xsede dos2unix YTr.sh sbatch -A TG-TRA150002 YTr.sh sbatch -A TG-DMS170019 YTr.sh

Run R in HPC Job submission R tutorials: NSF REU site at UNCW, 2017-2019 Run R in HPC Job submission R tutorials: https://www.cac.cornell.edu/education/training/StampedeJan2017/Python_R_HPC_Workshop.pdf Modified from Dr. Patricia Kelley, 06/13/2017

Load R in both Windows or Mac Type "module load Rstats", then "R” You then can do a lot of things with R Type “library(parallel)” Type ”detectCores()” module load Rstats R library(parallel) detectCores() Right click the mouse to paste the contents.

Log into TACC – From Windows After typing in the following notes, you will see the following message: moduel load Rstats R library(parallel) detectCores()

Useful commands lscpu to see the info about cpu ls to list all files Familiar with UNIX commands, vi? ’showq -u tg831870’, to see any job working? logout to logout

Use Cyberduck for Mac To transfer files into Xsede dos2unix YTr.sh Job submission: sbatch -A TG-TRA150002 YTr.sh sbatch -A TG-DMS170019 YTr.sh

How to submit a job in Windows NSF REU site at UNCW, 2017-2019 How to submit a job in Windows echo $HOME echo $WOKR echo $DATA echo $SCRATCH To submit a job: sbatch ccx.sh

How to submit a job in Windows NSF REU site at UNCW, 2017-2019 How to submit a job in Windows After submitting a job: sbatch ccx.sh

How to submit a job in Windows NSF REU site at UNCW, 2017-2019 How to submit a job in Windows When a job is done, an email will be received: Now go into your winscp to look at the result file “ccx326512.txt” Message Passing Interface (MPI)

How to make parallel computing in R NSF REU site at UNCW, 2017-2019 How to make parallel computing in R Example code for parallel computing in R: library(parallel) workerFunc <- function(n) {message(paste('we are working on the ',n,'th loop')); x<-rnorm(N,5,1); return(mean(x)) } numWorkers <- detectCores(); set.seed(12345); st<-Sys.time() res<-mclapply(c(1:n), workerFunc, mc.cores = numWorkers); Sys.time()-st Message Passing Interface (MPI)

Python Tutorials: https://cvw.cac.cornell.edu/python/hpp NSF REU site at UNCW, 2017-2019 Run Python in HPC Python Tutorials: https://cvw.cac.cornell.edu/python/hpp Modified from Dr. Patricia Kelley, 06/13/2017

How to run python in TACC NSF REU site at UNCW, 2017-2019 How to run python in TACC module load python module load python3* first, type $ module spider python3 to get instructions on other required modules

Multiprocess example from multiprocessing import Pool def f(x): NSF REU site at UNCW, 2017-2019 Multiprocess example from multiprocessing import Pool def f(x): return x*x p=Pool(4) ##starts 4 worker process print(p.map(f, range(10))) #prints[0, 1, 4, ..., 81] # idev -r ## This is only for reservation nodes Run in an interactive session: module load python python python_multiprocessing.py

Use a standard batch file: batch.sh NSF REU site at UNCW, 2017-2019 Use a standard batch file: batch.sh #!/bin/bash #SBATCH -p development #SBATCH -A your_account_name_goes_here #SBATCH -J mpi4py-demo #SBATCH -o mpi4py-demo.o%j #SBATCH -n 16 #SBATCH -t 00:05:00 # Prohibit writing core files on error. ulimit -c 0 set -x python receiver.py & ibrun python sample.py --loghost `hostname` --level debug pkill python

pip install --user line_profiler Time python filename.py NSF REU site at UNCW, 2017-2019 pip install --user line_profiler Time python filename.py