Download - Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: [email protected], [email protected] Laboratory of Composite Materials and Adaptive Structures

Transcript
Page 1: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

||

Christian Loosli and Claudia Thurnherr *

* Contact: [email protected], [email protected]

Laboratory of Composite Materials and Adaptive Structures

20.09.2016Claudia Thurnherr 1

Introduction to Euler

Page 2: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 2

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 3: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 3

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 4: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 4

Introduction and ideal simulation procedure

Euler is the high performance computing cluster at ETH

Every ETH member has access to Euler and can login (at the moment each user has available

storage of 16GB in the home folder with back-up and 2.5TB scratch without back-up)

Although you sometimes need to wait to start your batch job, there are a lot of resources

available which help you to run your simulation as fast as possible

1. Pre-processing:

• Modeling/mesh

• On your own

laptop/computer

2. Pre-processing

(if needed):

• Meshing/high

fidelity

• On griffin server

Solving:

• On your own

laptop/computer

(if small)

• On Euler

Post-processing:

• On your own

laptop/computer

• On griffin server (if

needed)

Page 5: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 5

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 6: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 6

How to connect to Euler

Euler is Unix based, hence you

need SSH (Secure Shell) as a

network protocol

We recommend to use the

program PuTTY

Host Name: euler.ethz.ch

Login with your nethz credentials

Page 7: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 7

How to connect to Euler

Euler is Unix based, hence you

need SSH (Secure Shell) as a

network protocol

We recommend to use the

program PuTTY

Host Name: euler.ethz.ch

Login with your nethz credentials

Page 8: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 8

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 9: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 9

How to exchange files

To upload files to your Euler-

folder you need a ftp client

(File Transfer Protocol)

We recommend to use

FileZilla or WinSCP

Use SFTP (Secure File

Transfer Protocol):

sftp://euler.ethz.ch

Page 10: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 10

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 11: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 11

Most important Unix commands (use Tab-key for auto-completion)

Command Meaning example

cd Change directory cd folder

cd .. Go to parent directory cd ../otherFolder

cp Copy cp file1 folder1

mkdir Make directory mkdir folder1

touch Make new file touch file1

mv Move or rename mv file1 folder1/folder2/folder3

mv file1 file2

rm Remove rm file1

-f Force (potentially dangerous) rm -f file1

-r Recursive (to address subfolders as well) cp -r folder1 folder 2 (if folder 1

contains other folders)

Page 12: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 12

Most important Unix commands (use Tab-key for auto-completion)

Command Meaning example

ls Show files in the current directory

pwd Show path

emacs filename Opens a file in the text editor emacs

gzip filename Compresses files

gunzip Uncompresses files

* To replace some letters file_*.txt

exit Close terminal / connection

Most things can also be done with the GUI of the FTP client (e.g. FileZilla, WinSCP)

Page 13: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 13

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 14: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 14

How to get around on Euler

All the important information are available in

the Euler-WIKI:

http://www.clusterwiki.ethz.ch/brutus/Getting_

started_with_Euler

Page 15: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 15

How to get around on Euler

Before you start: check which version of your

needed software is installed on Euler

See also:

http://www.clusterwiki.ethz.ch/brutus/Euler_Ap

plications#Applications_on_Euler

Euler Command Meaning

module avail Displays available versions of an

application / library

module list Displays the currently loaded modules

module load Loads a specific version of an application

module purge Unloads all currently loaded modules

Page 16: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 16

How to get around on Euler

Euler Command Meaning Example

bsub [command] Start job as a batch job (By default it will

start with 1 core for 4 hours using at most 1

GB of RAM.)

bsub matlab my_matlab_code.m

bsub matlab my_matlab_code.m

batch job Module /

software

File name

Page 17: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 17

How to get around on Euler: special commands for Euler

Euler Command Meaning Example

bsub [command] Start job as a batch job (By default it will

start with 1 core for 4 hours using at most 1

GB of RAM.)

bsub matlab my_maltab_code.m

bqueues Shows the running and pending jobs for all

the different queues

Available for us: 4h, 24h, 120h, 30days,

recommended: 4h, 24h

bjobs / bbjobs Shows status of submitted jobs

busers Shows how many resources you can use

Also refer to: http://www.clusterwiki.ethz.ch/brutus/LSF_mini_reference

On the application webpage you find links for various software specific commands

http://www.clusterwiki.ethz.ch/brutus/Euler_Applications#Applications_on_Euler

Page 18: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 18

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 19: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 19

Euler example: Ansys

Upload your infile.inp to Euler

If you work with Ansys classic, your input file is just your APDL file

If you work with Ansys Workbench, you need to export your input file:

Page 20: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 20

Euler example: Ansys

Upload your infile.inp to Euler

Type the command:

module load ansys/17

bsub –n 4 –W 4:00 –R “rusage[mem=2000]” “ansys170 –np 4 <infile.inp>

outfile.out”

-n / -np: number of processors

-W: desired time slot (4:00, 24:00, 120:00, …)

-mem: RAM memory allocationAlso refer to:

http://www.clusterwiki.ethz.ch/

brutus/Ansys_MECHANICAL

Page 21: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 21

Euler example: Ansys

To use distributed computing

Type the command:

module load ansys/17

bsub –n 4 –W 4:00 –R “rusage[mem=2000]” “ansys170 -dis –np 4 <infile.inp>

outfile.out”

-n / -np: number of processors

-W: desired time slot (4:00, 24:00, 120:00, …)

-mem: RAM memory allocationAlso refer to:

http://www.clusterwiki.ethz.ch/

brutus/Ansys_MECHANICAL

Page 22: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 22

Euler example: Ansys

For the post-processing in Ansys classic: Click on “General Postproc Read Results”

For the post-processing in Workbench: download the solution files (.rst) from Euler and import it

as follows:

Page 23: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 23

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 24: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 24

Euler example: Abaqus

Upload your infile.inp to Euler

Type the command:

module load abaqus

bsub –n 4 –W 4:00 –R “rusage[mem=2000]” abaqus job=infile cpus=4 [Abaqus-

Parameters]

-n / -np: number of processors

-W: desired time slot (4:00, 24:00, 120:00, …)

-mem: RAM memory allocation

Also refer to: http://www.clusterwiki.ethz.ch/brutus/Abaqus

Page 25: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 25

Euler example: Python

Upload your infile.py to Euler

Type the command:

module load python/VERSION

bsub [commands] python infile.py

(in connection with Abaqus type first: module load abaqus)

Page 26: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 26

Outline

Introduction and ideal simulation procedure

How to connect to Euler

How to exchange files

Most important Unix commands

How to get around on Euler

Euler example: Ansys

Euler example: Abaqus

Euler example: COMSOL

Page 27: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 27

Euler example: COMSOL

Upload your infile.mph file to Euler

Type the command: module load comsol/5.2

Shared memory:

bsub –n 4 –W 4:00 –R “rusage[mem=8000]” “comsol batch –np 4 –inputfile

infile.mph –outputfile outfile.mph”

-n / -np: number of processors

-W: desired time slot (4:00, 24:00, 120:00, …)

-mem: RAM memory allocation

Replace infile.mph with the name of your input file (must be a .mph file)

Page 28: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

|| 20.09.2016Claudia Thurnherr 28

Euler example: COMSOL

Upload your infile.mph file to Euler

Type the command: module load comsol

Shared memory:

bsub –n 4 –W 4:00 –R “rusage[mem=8000]” “comsol batch –np 4 –inputfile

infile.mph –outputfile outfile.mph”

Distributed memory:

bsub –n 4 comsol batch –clustersimple –inputfile infile.mph –outputfile

outfile.mph

Also refer to: http://www.clusterwiki.ethz.ch/brutus/Comsol_Multiphysics

Page 29: Introduction to Euler - ETH Z · Christian Loosli and Claudia Thurnherr * * Contact: cloosli@ethz.ch, thclaudi@ethz.ch Laboratory of Composite Materials and Adaptive Structures

Thank you for your attention

Contact:

Christian Loosli ([email protected]), Claudia Thurnherr ([email protected])