exercises:2017_uzh_cp2k-tutorial:login
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
exercises:2017_uzh_cp2k-tutorial:login [2017/06/26 08:06] – created jglan | exercises:2017_uzh_cp2k-tutorial:login [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 21: | Line 21: | ||
* a file transfer tool to copy files from/to the server: | * a file transfer tool to copy files from/to the server: | ||
- | * on Linux: put '' | + | * on Linux: put '' |
* on Mac OS X/OSX/macOS Sierra: use [[https:// | * on Mac OS X/OSX/macOS Sierra: use [[https:// | ||
* one Windows: use [[https:// | * one Windows: use [[https:// | ||
* a plain text editor to edit input files if you are uncomfortable with using '' | * a plain text editor to edit input files if you are uncomfortable with using '' | ||
- | Use the instructions giving in the lecture/ | + | Use the instructions giving in the lecture/ |
- | + | ||
- | <note important> | + | |
- | < | + | |
- | $ passwd | + | |
- | </ | + | |
- | </ | + | |
<note important> | <note important> | ||
< | < | ||
- | $ ssh -X username@tcopt3.chem.uzh.ch | + | $ ssh -X username@tcopt6.chem.uzh.ch |
</ | </ | ||
</ | </ | ||
- | ===== The bash terminal===== | ||
- | Many tasks in the following weeks will need to be performed on the terminal (or ' | ||
- | |||
- | <note tip> | ||
- | If you use Mac OS X: | ||
- | In order to keep the terminal in the dock also after you close it, right click on the symbol and select ' | ||
- | </ | ||
- | |||
- | |||
- | Let's start with a list of useful commands -- just type them into the command line and confirm with '' | ||
- | <code bash> | ||
- | ls # get list of files in the current directory | ||
- | mkdir molsim | ||
- | cd # change into your home directory | ||
- | cd molsim | ||
- | cd .. # go up one directory | ||
- | pwd # print path to the current working directory | ||
- | |||
- | </ | ||
- | |||
- | Now it is time to copy some files from the teacher account. | ||
- | |||
- | <code bash> | ||
- | |||
- | cp ~student10/ | ||
- | scp your_username@remotehost.edu: | ||
- | scp foobar.txt your_username@remotehost.edu:/ | ||
- | </ | ||
- | |||
- | After this, please close and reopen your terminal in order to activate the course-specific | ||
- | settings you copied. | ||
- | |||
- | We are now ready to get started. Below you find some additional commands that will come in handy later. | ||
- | |||
- | <code bash> | ||
- | vim myfile | ||
- | vi myfile | ||
- | </ | ||
Line 106: | Line 62: | ||
< | < | ||
- | $ module load cp2k/r17408_2016_09_19 | + | $ module load cp2k/r17968_2017_06_27 |
</ | </ | ||
Line 157: | Line 113: | ||
< | < | ||
$ cp2k.sopt -i cp2k.inp -o cp2k.out & | $ cp2k.sopt -i cp2k.inp -o cp2k.out & | ||
+ | $ mpirun -n $NUM_PROC cp2k.popt -i cp2k.inp -o cp2k.out & | ||
</ | </ | ||
Line 205: | Line 162: | ||
- | ===== Part III: Advanced account configuration ===== | ||
- | ==== Make module loading persistent ==== | ||
- | |||
- | Upon login, the shell ('' | ||
- | |||
- | < | ||
- | $ echo ' | ||
- | </ | ||
- | |||
- | after that you can add and remove modules to be loaded at startup using '' | ||
- | |||
- | To add '' | ||
- | |||
- | < | ||
- | $ module initadd vmd | ||
- | $ module initadd cp2k/ | ||
- | </ | ||
- | |||
- | to remove '' | ||
- | |||
- | < | ||
- | $ module initrm vmd | ||
- | </ | ||
- | |||
- | Alternatively you can of course simply edit '' | ||
- | |||
- | ==== Setup key-based authentication ==== | ||
- | |||
- | To avoid having to type the password every time you log in (and to increase the security), keys can be used for authentication instead. The following instructions are **for OSX and Linux**. | ||
- | |||
- | First generate a key-pair **on your local machine** using | ||
- | |||
- | < | ||
- | $ ssh-keygen | ||
- | </ | ||
- | |||
- | and accept the defaults proposed and do not set a password. | ||
- | |||
- | Upload the public key **from your local machine** to tcopt3: | ||
- | |||
- | < | ||
- | $ scp ~/ | ||
- | </ | ||
- | |||
- | Now login to '' | ||
- | |||
- | < | ||
- | $ mkdir -p .ssh | ||
- | $ chmod 0700 .ssh | ||
- | $ mv id_rsa.pub .ssh/ | ||
- | </ | ||
- | |||
- | When connecting to the server **from your local machine** now, use: | ||
- | |||
- | < | ||
- | $ ssh -i ~/ | ||
- | </ | ||
- | |||
- | ==== Simplify the login ==== | ||
- | |||
- | The following instructions apply **apply to OSX and Linux**. | ||
- | |||
- | **On your local machine** add the following part to the file '' | ||
- | |||
- | < | ||
- | Host tcopt3 | ||
- | HostName tcopt3.chem.uzh.ch | ||
- | User studentXX | ||
- | </ | ||
- | |||
- | after which you will be able to connect to '' | ||
- | |||
- | < | ||
- | $ ssh tcopt3 | ||
- | </ | ||
- | |||
- | If you have setup key-based authentication as shown above, augment the entry to the following instead, to always use key-based authentication without having to specify '' | ||
- | |||
- | < | ||
- | Host tcopt3 | ||
- | HostName tcopt3.chem.uzh.ch | ||
- | User studentXX | ||
- | IdentityFile ~/ | ||
- | IdentitiesOnly yes | ||
- | PreferredAuthentications publickey | ||
- | </ |
exercises/2017_uzh_cp2k-tutorial/login.1498464364.txt.gz · Last modified: 2020/08/21 10:15 (external edit)