User Tools

Site Tools


exercises:2016_uzh_cmest:login

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
exercises:2016_uzh_cmest:login [2016/09/21 10:38]
tmueller [Part I: Login]
exercises:2016_uzh_cmest:login [2016/09/22 09:48] (current)
tmueller
Line 1: Line 1:
-====== ​Your first simulation ​======+====== ​First Login ======
  
-In this exercise you will learn how to run your first calculation.+In this exercise you will learn how to login and run commands on our infrastructure.
  
 ===== Part I: Login ===== ===== Part I: Login =====
Line 19: Line 19:
  
   * 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 ''​sftp:​////​tcopt3.chem.uzh.ch''​ as the address in your file browser and you should be able to login and browser ​your home directory+    * on Linux: put ''​%%sftp://​tcopt3.chem.uzh.ch%%''​ as the address in your file browser and you should be able to browse ​your home directory ​after logging in
     * on Mac OS X/OSX/macOS Sierra: use [[https://​cyberduck.io/​|Cyberduck]]     * on Mac OS X/OSX/macOS Sierra: use [[https://​cyberduck.io/​|Cyberduck]]
     * one Windows: use [[https://​winscp.net/​|WinSCP]] or [[https://​cyberduck.io/​|Cyberduck]]     * one Windows: use [[https://​winscp.net/​|WinSCP]] or [[https://​cyberduck.io/​|Cyberduck]]
   * a plain text editor to edit input files if you are uncomfortable with using ''​vim'',​ ''​nano''​ or ''​emacs''​ via SSH. Please note: It is important that your editor supports Unix line endings. If in doubt, use one of the mentioned editors on the server, or an advanced plain text editor like [[https://​atom.io/​|Atom]] (plus the [[https://​atom.io/​packages/​line-ending-selector-unix|line-ending-selector-unix]] plugin) or [[https://​notepad-plus-plus.org/​|Notepad++]] on your local machine.   * a plain text editor to edit input files if you are uncomfortable with using ''​vim'',​ ''​nano''​ or ''​emacs''​ via SSH. Please note: It is important that your editor supports Unix line endings. If in doubt, use one of the mentioned editors on the server, or an advanced plain text editor like [[https://​atom.io/​|Atom]] (plus the [[https://​atom.io/​packages/​line-ending-selector-unix|line-ending-selector-unix]] plugin) or [[https://​notepad-plus-plus.org/​|Notepad++]] on your local machine.
 +
 +Use the instructions giving in the lecture/​available via OLAT to login on the server ''​tcopt3.chem.uzh.ch''​ using your assigned student account.
  
 <note important>​Change the password of your account after your first login, using: <note important>​Change the password of your account after your first login, using:
Line 62: Line 64:
  
 <​code>​ <​code>​
-$ cp2k.popt --help+$ cp2k.sopt --help
 </​code>​ </​code>​
  
Line 68: Line 70:
  
 <​code>​ <​code>​
- cp2k.popt [-c|--check] [-e|--echo] [-h|--help] [--html-manual]+ cp2k.sopt [-c|--check] [-e|--echo] [-h|--help] [--html-manual]
            [-i] <​input_file>​            [-i] <​input_file>​
            ​[-mpi-mapping|--mpi-mapping] <​method>​            ​[-mpi-mapping|--mpi-mapping] <​method>​
Line 76: Line 78:
  ​starts the CP2K program, see <​https://​www.cp2k.org/>​  ​starts the CP2K program, see <​https://​www.cp2k.org/>​
  
- The easiest way is cp2k.popt <​input_file>​+ The easiest way is cp2k.sopt <​input_file>​
  
  The following options can be used:  The following options can be used:
Line 99: Line 101:
   --xml             : dumps the whole CP2K input structure as a XML file   --xml             : dumps the whole CP2K input structure as a XML file
                       xml2htm generates a HTML manual from this XML file                       xml2htm generates a HTML manual from this XML file
 +</​code>​
 +
 +Another program we need for visualization is [[http://​www.ks.uiuc.edu/​Research/​vmd/​|VMD]].
 +
 +Load the respective module (since there is only one version available, the shorthand ''​vmd''​ can be used when specifying the module to load) and start it using:
 +
 +<​code>​
 +$ vmd
 +</​code>​
 +
 +Two new windows named ''​VMD Main''​ and ''​VMD 1.9.2 ... Display''​ should open on your local machine while the server shows:
 +
 +<​code>​
 +Info) VMD for LINUXAMD64, version 1.9.2 (December 29, 2014)
 +Info) http://​www.ks.uiuc.edu/​Research/​vmd/ ​                        
 +Info) Email questions and bug reports to vmd@ks.uiuc.edu ​          
 +Info) Please include this reference in published work using VMD:   
 +Info)    Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual ​  
 +Info)    Molecular Dynamics',​ J. Molec. Graphics 1996, 14.1, 33-38.
 +Info) -------------------------------------------------------------
 +Info) Multithreading available, 32 CPUs detected.
 +Info) Free system memory: 256213MB (99%)
 +Warning) Detected a mismatch between CUDA runtime and GPU driver
 +Warning) Check to make sure that GPU drivers are up to date.
 +Info) No CUDA accelerator devices available.
 +Warning) Detected X11 '​Composite'​ extension: if incorrect display occurs
 +Warning) try disabling this X server option. ​ Most OpenGL drivers
 +Warning) disable stereoscopic display when '​Composite'​ is enabled.
 +libGL error: failed to load driver: swrast
 +libGL error: Try again with LIBGL_DEBUG=verbose for more details.
 +Info) OpenGL renderer: GeForce GTX 760 (192-bit)/​PCIe/​SSE2
 +Info)   ​Features:​ STENCIL MSAA(4) MDE MTX NPOT PP PS 
 +Info)   GLSL rendering mode is NOT available.
 +Info)   ​Textures:​ 2-D (16384x16384),​ 3-D (2048x2048x2048),​ Multitexture (4)
 +Info) Dynamically loaded 2 plugins in directory:
 +Info) /​sw/​build/​generic/​app/​vmd/​vmd-1.9.2/​lib/​vmd/​plugins/​LINUXAMD64/​molfile
 +vmd >
 +</​code>​
 +
 +If you only get the output on the server but not the 2 windows there is something wrong with your setup and you should check the lecture notes again. You can exit VMD by either closing the ''​VMD Main''​ or by giving the ''​quit''​ command at the ''​vmd >''​ prompt:
 +
 +<​code>​
 +vmd > quit
 </​code>​ </​code>​
  
Line 104: Line 149:
  
  
 +===== Part III: Advanced account configuration =====
 +
 +==== Make module loading persistent ====
 +
 +Upon login, the shell (''​bash''​ in our case) executes a number of files if they exist. One of them is the ''​.bashrc''​. To prepare it for management using the the ''​module''​ command, simply execute the following **once**:
 +
 +<​code>​
 +$ echo '​module load ' >> ~/.bashrc
 +</​code>​
 +
 +after that you can add and remove modules to be loaded at startup using ''​module initadd''​ or ''​module initrm''​.
 +
 +To add ''​vmd''​ and ''​cp2k'',​ run for example:
 +
 +<​code>​
 +$ module initadd vmd
 +$ module initadd cp2k/​r17408_2016_09_19
 +</​code>​
 +
 +to remove ''​vmd''​ again from the list of modules to load:
 +
 +<​code>​
 +$ module initrm vmd
 +</​code>​
 +
 +Alternatively you can of course simply edit ''​.bashrc''​ using your favorite editor and add a line like ''​module load vmd cp2k/​r17408_2016_09_19''​ by yourself.
 +
 +==== 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
 +
 +<​code>​
 +$ ssh-keygen
 +</​code>​
 +
 +and accept the defaults proposed and do not set a password.
 +
 +Upload the public key **from your local machine** to tcopt3:
 +
 +<​code>​
 +$ scp ~/​.ssh/​id_rsa.pub studentXX@tcopt3.chem.uzh.ch:​~/​
 +</​code>​
 +
 +Now login to ''​tcopt3.chem.uzh.ch''​ and move the uploaded public key to the right place:
 +
 +<​code>​
 +$ mkdir -p .ssh
 +$ chmod 0700 .ssh
 +$ mv id_rsa.pub .ssh/​authorized_keys
 +</​code>​
 +
 +When connecting to the server **from your local machine** now, use:
 +
 +<​code>​
 +$ ssh -i ~/​.ssh/​id_rsa studentXX@tcopt3.chem.uzh.ch
 +</​code>​
 +
 +==== Simplify the login ====
 +
 +The following instructions apply **apply to OSX and Linux**.
 +
 +**On your local machine** add the following part to the file ''​.ssh/​config''​ in your home directory:
 +
 +<​code>​
 +Host tcopt3
 +  HostName tcopt3.chem.uzh.ch
 +  User studentXX
 +</​code>​
 +
 +after which you will be able to connect to ''​tcopt3''​ simply by using
 +
 +<​code>​
 +$ ssh tcopt3
 +</​code>​
 +
 +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 ''​-i ~/​.ssh/​id_rsa''​ manually:
 +
 +<​code>​
 +Host tcopt3
 +  HostName tcopt3.chem.uzh.ch
 +  User studentXX
 +  IdentityFile ~/​.ssh/​id_rsa
 +  IdentitiesOnly yes
 +  PreferredAuthentications publickey
 +</​code>​
exercises/2016_uzh_cmest/login.1474454291.txt.gz ยท Last modified: 2016/09/21 10:38 by tmueller