bwunicluster Tutorial Access, Data Transfer, Compiling, Modulefiles, Batch Jobs

Similar documents
bwunicluster Tutorial Access, Data Transfer, Compiling, Modulefiles, Batch Jobs

Access: bwunicluster, bwforcluster, ForHLR

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

CS CS Tutorial 2 2 Winter 2018

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

Introduction to the Linux Command Line

High Performance Computing (HPC) Club Training Session. Xinsheng (Shawn) Qin

Introduction: What is Unix?

AMS 200: Working on Linux/Unix Machines

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

For Dr Landau s PHYS8602 course

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Introduction to Linux for BlueBEAR. January

HPC Introductory Course - Exercises

Introduction to Joker Cyber Infrastructure Architecture Team CIA.NMSU.EDU

Lab 1 Introduction to UNIX and C

Short Read Sequencing Analysis Workshop

A Hands-On Tutorial: RNA Sequencing Using High-Performance Computing

bwfortreff bwhpc user meeting

Using the computational resources at the GACRC

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Session 1: Accessing MUGrid and Command Line Basics

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

New User Tutorial. OSU High Performance Computing Center

Introduction to the shell Part II

Using ISMLL Cluster. Tutorial Lec 5. Mohsan Jameel, Information Systems and Machine Learning Lab, University of Hildesheim

Linux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center

Introduction to Linux Workshop 1

Parallel Programming Pre-Assignment. Setting up the Software Environment

Migrating from Zcluster to Sapelo

Exercise 1: Basic Tools

CS 261 Recitation 1 Compiling C on UNIX

Introduction to remote command line Linux. Research Computing Team University of Birmingham

The cluster system. Introduction 22th February Jan Saalbach Scientific Computing Group

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

CISC 220 fall 2011, set 1: Linux basics

Working with Basic Linux. Daniel Balagué

CS Fundamentals of Programming II Fall Very Basic UNIX

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Tutorial: Compiling, Makefile, Parallel jobs

Lab 1 Introduction to UNIX and C

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

The Linux Command Line & Shell Scripting

Linux/Cygwin Practice Computer Architecture

An Introduction to Cluster Computing Using Newton

A Brief Introduction to The Center for Advanced Computing

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

Exercise 1: Connecting to BW using ssh: NOTE: $ = command starts here, =means one space between words/characters.

Logging in to the CRAY

This tutorial will guide you how to setup and run your own minecraft server on a Linux CentOS 6 in no time.

CSC BioWeek 2018: Using Taito cluster for high throughput data analysis

Introduction to Discovery.

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Unix Workshop Aug 2014

A Brief Introduction to The Center for Advanced Computing

CSC BioWeek 2016: Using Taito cluster for high throughput data analysis

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

CSC111 Computer Science II

Linux hep.wisc.edu

Lab 1: Introduction to C, ASCII ART & the Linux Command Line

Computer Systems and Architecture

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Lab Working with Linux Command Line

Introduction to Discovery.

Introduction to Discovery.

User Guide Version 2.0

Supercomputing environment TMA4280 Introduction to Supercomputing

Introduction to HPC Resources and Linux

Introduction to the UNIX command line

Introduction to the Linux Command Line. Ken Weiss HITS Computational Research Consulting Division

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

A Brief Introduction to The Center for Advanced Computing

Introduction to Linux/Unix. Xiaoge Wang, ICER Jan. 14, 2016

Mills HPC Tutorial Series. Linux Basics I

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

The Unix Shell & Shell Scripts

Introduction to UNIX Command Line

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Crash Course in High Performance Computing

Programming Environment on Ranger Cluster

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018

Introduction to Computing V - Linux and High-Performance Computing

C++ Programming on Linux

Introduction to UNIX command-line II

Practical Session 0 Introduction to Linux

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Helpful Tips for Labs. CS140, Spring 2015

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Linux Introduction Martin Dahlö

Computer Systems and Architecture

CHE3935. Lecture 1. Introduction to Linux

Introduction to UNIX. SURF Research Boot Camp April Jeroen Engelberts Consultant Supercomputing

Linux Survival Guide

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

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

Beginner's Guide for UK IBM systems

Transcription:

bwunicluster Tutorial Access, Data Transfer, Compiling, Modulefiles, Batch Jobs Frauke Bösert, SCC, KIT 1

Material: Slides & Scripts https://indico.scc.kit.edu/indico/event/263/ @bwunicluster/forhlr I/ForHLR II: /pfs/data1/software_uc1/bwhpc/kit/workshop/2016-12-06 How to read the following slides Abbreviation/Colour code Full meaning $ command -option value $ = prompt of the interactive shell The full prompt may look like: user@machine:path$ The command has been entered in the interactive shell session <integer> <string> foo, bar <> = Placeholder for integer, string etc Metasyntactic variables 2

Login <UserID> username prefix Host <host> bwunicluster: uc1.scc.kit.edu = <prefix_username> = your user account at your university. = organization's token KIT: ka but NO ka_ for bwunicluster/forhlr I&II Uni Stuttgart: st, Uni Hohenheim: ho, HS Esslingen: es, Uni Freiburg: fr bwfilestorage: bwfilestorage-login.lsdf.kit.edu Linux / macos open terminal: $ ssh <UserID>@<host> Windows use SSH-Client, e.g. PuTTY connect to <host>: Login as: <UserID> 3

Revision: basic linux commands Cheat sheet: http://ryanstutorials.net/linuxtutorial/cheatsheet.php $ pwd show path of working directory $ mkdir <dirname> make directory $ cd <dirname> change directory $ ls list directory content $ cp <sourcefile> <targetfile> copy file $ mv <sourcefile> <targetfile> move file $ rm <filename> remove file $ nano <filename> edit file $ man <command> show command s manual 4

Exercise 1: Login+Linux TASK/ToDo: 10 10 min min Login to bwunicluster Exit login 1. Generate folder with today s date (use syntax YYYY-MM-DD) unter $HOME 2. Generate empty file with name moab1_ + today s date Hint: use command touch For use of touch read manual via command man touch 3. Move file to $HOME/<YYYY-MM-DD>; Rename file by adding the extension.sh 4. Find under /opt/bwhpc/kit/workshop/2016-12-06 (man find) the PDF of the talk starting with the string 04_2016-12-06 ; Copy it to your folder generated under 1. 5. Go to folder $HOME/<YYYY-MM-DD> and open the PDF with evince it will fail: find the option of the SSH command in the manual man ssh look at Enables X11 forwarding Re-login to bwunicluster with the SSH + new option and open PDF with evince 5

Exercise 1: Login+Linux Solution (1) TASK/ToDo: 10 10 min min Login to bwunicluster 1. Generate folder with today s date (use syntax YYYY-MM-DD) unter $HOME $ mkdir -pv $HOME/2016-12-06 2. Generate empty file with name moab1_ + today s date $ touch moab1_2016-12-06 3. Move file to $HOME/<YYYY-MM-DD> ; Rename file by adding the extension.sh $ mv moab1_2016-12-06 $HOME/2016-12-06 $ cd $HOME/2016-12-06 $ mv moab1_2016-12-06 moab1_2016-12-06.sh 4. Find PDF of the talk starting with the string 04_2016-12-06 ; Copy it to your folder generated under 1. $ find /opt/bwhpc/kit/workshop/2016-12-06 -name "04_2016-12-06*" $ cp /opt/bwhpc/kit/workshop/2016-12-06/slides/04_2016-12-06_bwhpc_course_- _bwunicluster_tutorial.pdf $HOME/2016-12-06 6

Exercise 1: Login+Linux Solution (2) TASK/ToDo: 10 10 min min Exit login $ exit Re-login with X-forwarding $ ssh -X <userid>@uc1.scc.kit.edu Go to folder $HOME/<YYYY-MM-DD> and open the PDF with evince $ cd $HOME/2016-12-06 $ evince 04_2016-12-06_bwHPC_course_-_bwUniCluster_Tutorial.pdf 7

Data Transfer From localhost to cluster: use scp (secure copy) or sftp (secure file transfer program) Read manual for options/syntax questions (man scp, man sftp) From Linux to Linux Systems you can also use rsync Linux / OS X Open terminal at your computer: $ scp <sourcefile> <username>@<host>:<targetfile> or $ sftp <username>@<host>:<targetdir> $ put <sourcefile> Windows use SCP/SFTP-Client, e.g. WinSCP connect to <username>@<host> copy data by drag&drop mechanism 8

From $HOME to Workspaces Compute nodes read&write in workspaces much faster than in $HOME directory. DO NOT COMPUTE IN $HOME!! $HOME: For: Source code Workspaces: HowTo: compare previous talk slide no 9 For: Program input (e.g. initial and boundary conditions) Program output 9

Exercise 2: Data Transfer TASK/ToDo: 10 10 min min 1.Download 04_2016-12-06_bwHPC_course_suppl.tar.gz from https://indico.scc.kit.edu/indico/event/263/material/0/ to your course computer 2.Copy *tar.gz to $HOME/<YYYY-MM-DD> at bwunicluster 3.Login to bwunicluster 4.Generate workspace with lifetime of 10 days and name workshop 5.Copy *tar.gz to your workspace 6.Unpack the archive *tar.gz in your workspace Hint: for unpack use command + options: tar xvbfz 10

Exercise 2: Data Transfer - Solution TASK/ToDo: 10 10 min min 1.Download 04_2016-12-06_bwHPC_course_suppl.tar.gz 2.Copy *tar.gz to $HOME/<YYYY-MM-DD> at bwunicluster $ scp 04_2016-12-06_bwHPC_course_suppl.tar.gz <userid>@uc1.scc.kit.edu:~/2016-12-06 3.Login to bwunicluster $ ssh <userid>@uc1.scc.kit.edu 4.Generate workspace with lifetime of 10 days and name workshop $ ws_allocate workshop 10 5.Copy *tar.gz to your workspace $ cp -vp ~/2016-12-06/04_2016-12-06_bwHPC_course_suppl.tar.gz $(ws_find workshop) 6.Unpack the archive *tar.gz in your workspace $ cd $(ws_find workshop) $ tar xvbfz 04_2016-12-06_bwHPC_course_suppl.tar.gz 11

Module Environment Users require different software in different versions. Software is installed and can be used by loading corresponding modules. $ module avail show all installed software packages $ module avail compiler show all available compilers $ module load <modulepath> load a module in list $ module unload <modulepath> remove a module from list $ module list show all loaded modules $ module show <modulepath> show environment variables of module $ module help <modulepath> show usage information of module 12

Exercise 3: Editors/Create script TASK/ToDo: 10 10 min min 1. Choose: a) vim cheat sheet: http://vim.rtorr.com/ b) nano cheat sheet: http://alturl.com/wbtrk c) emacs login to bwunicluster via X-forwarding, i.e., ssh -X cheat sheet: http://www.rgrjr.com/emacs/emacs_cheat.html 2. Insert in file moab1_2016-12-06.sh, save it, print content to screen #!/bin/bash #!/bin/bash which which icc icc module module load load compiler/intel compiler/intel which which icc icc 3. Change file permission to make moab1_2016-12-06.sh executable 4. Run script 13

Exercise 3: Editors/Create script - Solution TASK/ToDo: 10 10 min min 2. Insert in file moab1_2016-12-06.sh, save it, print content to screen $ cd $HOME/2016-12-06 $ vim moab1_2016-12-06.sh $ cat moab1_2016-12-06.sh 3. Change file permission to make moab1_2016-12-06.sh executable $ chmod u+x moab1_2016-12-06.sh 4. Run script $./moab1_2016-12-06.sh 14

Environment variables in job scripts Details: http://www.bwhpc-c5.de/wiki/index.php/batch_jobs#environment_variables_for_batch_jobs MOAB variables and own environment variables Using MOAB Variables Defining own variables Header #MSUB -o $(JOBNAME).o$(JOBID) #MSUB -v EXEC=./hello Execution Part echo Job ${MOAB_JOBNAME} is running (ID=${MOAB_JOBID}) export EXEC=./hello 15

Keep track of a job Submit job script $ msub <jobscript> If a job (script) is accepted the <jobid> appears at screen. $ checkjob <jobid> show job details $ showq list all my running, idling and blocked jobs by <jobid> $ showq -n list all my running, idling and blocked jobs by <jobname> $ showq -c list my completed jobs $ canceljob <jobid> cancel job 16

Exercise 4: Batch job TASK/ToDo: 10 10 min min 1. Copy moab1_2016-12-06.sh to the subfolder in your workspace containing hello.c 2. Go to your workspace; load intel compiler 3. Compile existing code and execute hello.x Hint for compiling: $ icc -o hello.x hello.c 4. Replace all in moab1_2016-12-06.sh with the following lines & save it #!/bin/bash #!/bin/bash #MSUB #MSUB -l -l nodes=1:ppn=1,walltime=00:01:00 nodes=1:ppn=1,walltime=00:01:00 #MSUB #MSUB -l -l mem=100mb mem=100mb #MSUB #MSUB -l -l advres=workshop.8 advres=workshop.8 #MSUB #MSUB -N -N firstjob firstjob./hello.x./hello.x sleep sleep 10 10 5. Submit script to queueing system + watch progress 17

Exercise 4: Batch job - Solution TASK/ToDo: 10 10 min min 1. Copy moab1_2016-12-06.sh to subfolder of your workspace containing hello.c $ cd $HOME/2016-12-06 $ cp -pv moab1_2016-12-06.sh $(ws_find workshop)/2016-12-06/exercises/04 2. Go to that subfolder in your workspace; load intel compiler $ cd $(ws_find workshop)/2016-12-06/exercises/04 $ module load compiler/intel 3. Compile existing code and execute hello.x $ icc -v -o hello.x hello.c $./hello.x 4. Replace all in moab1_2016-12-06.sh with the following lines & save it $ vim moab1_2016-12-06.sh 5. Submit script to queueing system + watch progress $ msub moab1_2016-12-06.sh $ showq 18