1 / 23

Understanding the Basics of Computational Informatics

Understanding the Basics of Computational Informatics . 2014. Summer School, Hungary, Szeged Methos L. Müller. Table of contents. Introduction to the Linux environment Login to the cluster Basic commands Upload the input files Submit a GAUSSIAN job to the cluster Getting back the result

sandro
Download Presentation

Understanding the Basics of Computational Informatics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Understanding the Basics of Computational Informatics 2014. Summer School, Hungary, Szeged Methos L. Müller

  2. Table of contents • Introduction to the Linux environment • Login to the cluster • Basic commands • Upload the input files • Submit a GAUSSIAN job to the cluster • Getting back the result • Downloading the outputs • Scripts for collecting data Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  3. Introduction to the Linux environment Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs. Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. Linus Torvalds developed the first Linux operating system at October 5, 1991. Linus Torvalds Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  4. Introduction to the Linux environment Famous linux distros: Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  5. Introduction to the Linux environment We are using Ubuntu on the cluster. Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  6. Login to the cluster The IP address of the cluster: 160.114.81.18 Login to the cluster: ssh username@160.114.81.18 For example: ssh mullerl@160.114.81.18 Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  7. Basic commands man <command> ­ shows all information about the command <command> ­­help ­ shows the available options for that command mkdir – make directories Usage: mkdir [OPTION] DIRECTORY... ls – list directory contents Usage: ls [OPTION]... [FILE]... ls *.txt – prints all text files cd – changes directories Usage: cd [DIRECTORY] pwd– print name of current working directory Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  8. Basic commands cp – copy files and directories Usage: cp [OPTION]... SOURCE DEST mv – move (rename) files Usage: mv [OPTION]... SOURCE DEST mc – Midnight Commander (File manager mcedit – The Midnight Commander’s file editor top – display top CPU processes Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  9. Basic commands • rm ­ remove files • Usage: rm [OPTION]... FILE... • find – search for files in a directory hierarchy • Usage: find [OPTION] [path] [pattern] • history – prints recently used commands • Usage: history • cat – concatenate files and print on the standard output • Usage: cat [OPTION] [FILE]... • awk ­ pattern scanning and processing language Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  10. Basic commands qhost Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  11. Basic commands qdel job_id – Delete a jobqdel –u username – Delete all job qstat Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  12. Upload the input file Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  13. Upload the input file Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  14. Submit a GAUSSIAN job to the cluster subg09.sh subg09.sh jgypk 8 neverend g09 input_file.com Usage: subg09.sh clusterName procNum queue inpFileName clusterName - the name of the cluster you want your job to run on. It MUST be one of: jgypk, niifszeged or niifpecs! procNum - number of processors you want GAUSSIAN09 to run on. This parameter is depending on the cluster. queue - it must be "short" (8 hours), "normal" (24 hours), long (72 hours) or "neverend" (no limits). Don't use the quotes(")! Just one of the words: short, normal, long, or neverend! Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  15. Submit a GAUSSIAN job to the cluster application - the GAUSSIAN09 related application's name. It can be one of: g09 inpFileName - input filename for GAUSSIAN09, it MUST end with either .com or .inp extension The input file must NOT contain any NProc, NProcShared or Rwf statement! Checkpoint files are handled automatically. subg09.sh jgypk 8 neverend g09 input_file.com Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  16. Getting back the result Input file The result Report file about the calculation Report file about the scratch Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  17. Downloading the outputs Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  18. Scripts for collecting data • Find and print all of the values in a file. • Content of the collect.sh file: • #!/bin/bash • # collecting the data • awk '/Maximum Force/ {print}' filename.log • Run the script: • bash collect.sh Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  19. Scripts for collecting data • Use variables in the command • Content of the variable.sh file: • #!/bin/bash • variable=10 • echo $variable • Run the script: • bash variable.sh Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  20. Scripts for collecting data for loop syntax: for { variable name } in { list } do execute one for each item in the list until the list is not finished (And repeat all statement between do and done) done for i in 1 2 3 4 5 do echo "Welcome $i times" done for i in {1..5} do echo "Welcome $i times" done Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  21. Scripts for collecting data List all of the .out files in the folder #!/bin/bash # the file extension what we want to use InPutExt=out for InPutName in `ls -1 *.$InPutExt` do # print the name of the files with the extension echo $InPutName done exit Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  22. Scripts for collecting data Run a commands from a variable #!/bin/bash # the file extension what we want to use InPutExt=out for InPutName in `ls -1 *.$InPutExt` do result=`awk '/NSTEP/ {print $3}' $InPutName` echo $result done exit Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

  23. Thank you for your kind attention! Summer School • Szeged, 2014. May 13. Department of Chemical Informatics

More Related