Difference between revisions of "User:Mukund-pondkule-6a11@uni-paderborn.de"

From HPC Wiki
Jump to navigation Jump to search
(.)
 
(165 intermediate revisions by the same user not shown)
Line 1: Line 1:
An Introduction to the Linux Operating System and Command Line. The course provides students with a hands-on approach for learning Linux through assignments and projects. 
+
Introduction text here.  
  
 
__TOC__
 
__TOC__
  
 +
{{YouTube|id=IfD9IPixgpo|time=3m2s}}
  
 
+
{{Infobox table
=== Test === <!--T:8-->
+
| REAL-NAME    = HPC.NRW
 
+
| image  = Dhnrw_logo.png
 
+
| Feldnamehead1 = table name
 
+
| Feldname1 = Kontakt            | Daten2 = RWTH Aachen
 
+
| Feldname2 = Bundesland        | Daten3 = Nord Rhein Wesfallen
<quiz display=simple>
+
| Feldname3 = Beginn            | Daten4 = 2019
{ Type text here or a no-break space code
+
| Feldname4 = Ende              | Daten5 = 2021
|type="{}"}
+
| Feldnamehead2 = activities
Where was Aristotle born? { Stageira }
+
| Feldname5 = AP2                | Daten6 = Arbeitspaket 2
 
+
| Feldname6 = AP3                | Daten7 = Arbeitspaket 3
{ Type text here or a no-break space code
+
| Feldname7 = AP4                | Daten8 = Arbeitspaket 4
|type="{}"}
+
| Feldname8 = Institutes        | Daten9 = 13
Name Aristotle's famous mentor. { Plato }
+
| Feldname9 = -                 | Daten10 = ***
 
+
| Feldname10 = -                 | Daten11 = ***
{ Type text here or a no-break space code
+
| Feldname11 = -                 | Daten12 = ***
|type="{}"}
+
| Feldname12 = -                | Daten13 = ***
{ Alexander } was Aristotle's most famous pupil.
+
| Feldname13 = -                | Daten14 = ***
 
 
{ Type text here or a no-break space code
 
|type="{}"}
 
Name Aristotle's famous mentor. { Plato _6 }
 
 
 
{ Type text here or a no-break space code
 
|type="{}"}
 
Name a famous Greek philospher. <br>
 
{ Aristotle|Plato|plato|aristotle }
 
</quiz>
 
 
 
 
 
{{#evt:
 
service=youtube
 
|id=https://www.youtube.com/watch?v=StPSujfX0YI
 
|alignment=right
 
 
}}
 
}}
  
{{#ev:youtube|https://www.youtube.com/watch?v=StPSujfX0YI|1000|right|Let eet GO|frame}}
 
 
{{#evl:21X5lGlDOfg|NASA Live|1|player=example-player}}
 
  
<youtube>https://www.youtube.com/watch?v=StPSujfX0YI</youtube>
 
  
<youtube width="200" height="120">StPSujfX0YI</youtube>
 
  
  
  
[[File:<youtube>https://www.youtube.com/watch?v=StPSujfX0YI</youtube>|start=2|end=6]]
 
  
=== Historical Background === <!--T:8-->
 
  
'''Video:''' Slide 17 - 23 (7 pages), 5 min 45 sec (Text) + 15 sec (Quiz)
 
  
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
  
Text
 
  
  
'''Quiz:'''
 
1. Are all Top 500 supercomputers using Linux in HPC?
 
  A: Yes
 
  B: No
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | A
 
    | Explanation: see https://top500.org/statistics/list (access on 27.08.2020) List in June 2020 shows all Top 500 supercomputers are using Linux.
 
    |}
 
           
 
2. What does GNU stands for?
 
  A. GNU's Not Unix
 
  B. Geek Needed Unix
 
  C. General Unix
 
  D. General Unix
 
  E. None of the Above
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | A
 
    |}
 
  
[[File:Tip.png]]
 
'''Tips: no tips in this section'''
 
  
[[File:Important.png]]
 
'''Warning: no warning in this section'''
 
  
[[File:Info.png]]
 
'''Exercises in Terminal: no exercises in this section'''
 
  
=== The Command Line === <!--T:8-->
 
  
'''Video:''' Slide 17 - 23 (7 pages), 5 min 45 sec (Text) + 15 sec (Quiz)
 
  
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
  
Text
 
  
  
'''Quiz:'''
 
1. Which keys can be used for command history?
 
  A: up- and down-arrow keys
 
  B: Page-up and Page-down keys
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | A
 
    | Explanation: up- and down-arrow keys (↑ and ↓) can be used for command history. The behavior of Page-up and Page-down keys depends on the setting of a terminal. But normally the command history is not available by using the Page-up and Page-down keys.
 
    |}
 
  
[[File:Tip.png]]
 
'''Tips: Working directory in console reminds user, where they are. (page 3)'''
 
  
[[File:Important.png]]
 
'''Warning: 1) In command line user may forget where they are (page 2).'''
 
''' 2) Child processes may stop, if parent shell exits (page 2).'''
 
  
  
'''Exercises in Terminal:'''
 
1. What's your username on a Linux computer?
 
  There are two ways to find your username on a Linux computer
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      1. In the command line prompt, e.g. [username@hostname ~]$ , you can find your username as username directly.
 
      2. The Linux command whoami can also show your username.
 
    |}
 
2. What's the hostname of a Linux computer?
 
  There are two ways to find the hostname on a Linux computer.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      1. In the command line prompt, e.g. [username@hostname ~]$ , you can find the hostname as hostname directly.
 
      2. The Linux command hostname can also give you the hostname.
 
    |}
 
           
 
3. What's your current working directory on a Linux computer?
 
    There are two ways to find your current working directory on a Linux computer.
 
    {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      1. In the command line prompt, e.g. [username@hostname ~]$ , you can find your current working directory is ~, which means your $HOME directory.
 
      2. The Linux command pwd can also show your current working directory.
 
    |}
 
           
 
4.  Use up- and down-arrow keys to see the command history.
 
    {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Explanation:</strong>
 
    |-
 
    |
 
      The up- and down- arrow keys can be used to navigate command history.
 
    |}
 
       
 
5.  Run sleep 1h command and wait, then use Ctrl-C to kill it.
 
    {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Explanation:</strong>
 
    |-
 
    |
 
      sleep 1h puts the terminal into idle, e.g. terminal is doing nothing, for 1 hour.
 
      Ctrl-C kills the current command. In this exercise it's sleep 1h.
 
    |}
 
  
=== Directory structure === <!--T:8-->
 
         
 
'''Video:''' Slide 33 - 48 (16 pages), 5 min 45 sec (Text + Demo + Quiz) + 15 sec (Tips and Warning)
 
  
  
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
  
Text
 
  
'''Quiz:'''
 
1. Which one is the top directory in Linux?
 
  A: /
 
  B: /home
 
  C: C:\
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |    A
 
    | Explanation: The tree structure for directory is used in Linux system. Therefore the top directory in Linux is /. The /home directory may be an upper level directory for all non-root users. The last option C:\ represents the C drive on Windows.
 
    |}
 
  
2. The command 'cd ' without arguments : if you start in var/log/ and run cd with no arguments, what do you expect will happen?
 
  A: Nothing it stays in /var/log/.
 
  B: It goes to your home directory.
 
  C: It goes to the filesystem root
 
  D: The shell prompt turns into a shark and eats you.
 
  E: It’s an error.
 
  F: The shell stops having a working directory.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |    B
 
    | It goes to your home directory. cd without arguments is a shortcut to take you home. As long as your home directory exists, you can always go home.
 
    |}
 
  
[[File:Tip.png]]
 
'''Tips: no tips in this section'''
 
  
[[File:Important.png]]
 
'''Warning: no <code>undo</code> and make sure what you want to do (page 16)'''
 
  
  
'''Exercises in Terminal (slide 49):'''
 
1. Go to a specific subfolder of a folder (example: cd Documents/courses/ ) and get back to the home directory using cd command. List 3 different ways to do it using one command. check after every action your path with pwd command.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
        cd
 
        cd ~
 
        cd $HOME
 
        the last option $HOME is an enviornment variable. You will learn about enviornment variables later.
 
    |}
 
     
 
2. Go to the directory /tmp and jump between /tmp and your home directory back and forth. check after every action your path with pwd command.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
        cd /tmp
 
        cd -
 
        cd - with cd - you change back to the previous working directory, pass the dash (-) character as an argument to the cd command.
 
    |}
 
  
=== Files === <!--T:8-->
 
  
'''Video:''' Slide 51 - 56 (6 pages), 5 min 30 sec (Text + Demo + Quiz) + 15 sec (Tips and Warning)
 
  
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
  
Text
 
  
'''Quiz:'''
 
1. Can you copy directory with </code>cp <old_dir> <new_dir></code> ?
 
  A: Yes
 
  B: No, -r option is needed for copying directory
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | B
 
    | Explanation: Without any option the cp command can only be used to copy files (text files as well as binary files). To copy a directory, the -r option must be used and it means to copy a given directory in a recursive manner e.g. one file after another in a directory.
 
    |}
 
  
  
[[File:Tip.png]]
 
'''Tips: no tips in this section'''
 
  
[[File:Important.png]]
 
'''Warning: 1. <code>rm -f</code>: no confirmation! Use with care (page 3).'''
 
''' 2. Wildcards expand before given to program (page 6).'''
 
  
  
'''Exercises in Terminal:'''
 
1. Use the find command to search for files, whose name ends with dat, in your home directory.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      The complete command is find $HOME -type f -name "*dat"
 
          find can be used to search files and directories.
 
          $HOME is your home directory.
 
          -type f means only file (not directory) will be shown.
 
          -name "*dat" specifies the required filename and "*dat" restricts the filename ends with dat, while it can begin with any characters (the * wild cards).
 
    |}
 
2. Use the find command to search for directories, whose name begins with test and ends with _dir, in your home directory.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      The complete command is find $HOME -type d -name "test*_dir"
 
          find can be used to search files and directories.
 
          $HOME is your home directory.
 
          -type d means only directory (not file) will be shown.
 
          -name "test*_dir" specifies the required directory name, which begins with test and ends with _dir. The wild card * matches any characters in between.
 
    |}
 
  
=== Text display, search === <!--T:8-->
 
  
'''Video:''' Slide 58 - 64 (7 pages), 5 min 40 sec (Text + Demo) + 15 sec (Quiz)
 
  
<gallery mode="packed" heights="250" perrow="1">
+
=== Template === <!--T:8-->
Linux intro.png|
 
</gallery>
 
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
+
<youtube width="600" height="400" right>IfD9IPixgpo</youtube>
  
Text
 
  
'''Quiz:'''
+
[https://www.isc-hpc.com/ THE EVENT FOR HIGH PERFORMANCE COMPUTING, MACHINE LEARNING AND DATA ANALYTICS]
1. Which command can be used to append text to filename?
 
  A: command > filename
 
  B: command >> filename
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | B
 
    | Explanation: The > operator redirects the output of command into filename. If filename exists already, its contents will be overwritten. The >> operator can redirect the output of command into filename as well, except that if filename exists, the new data are appended instead of overwritten.
 
    |}
 
  
2. How do I find all files containing specific text on Linux?
+
{{Clickable button|:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-green ui-button-large}}
    HINT: use grep command
 
    {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      grep -rnw '/path/to/somewhere/' -e 'pattern'
 
            -r or -R is recursive.
 
            -n is line number.
 
            -w stands for match the whole word.
 
            -l (lower-case L) can be added to just give the file name of matching files.
 
    |}
 
  
[[File:Tip.png]]
+
{{Warning|mode=warn|text= no warning in this section}}
'''Tips: no tips in this section'''
 
 
 
[[File:Important.png]]
 
'''Warning: no warning in this section'''
 
  
 
+
{{Warning|mode=info|text= no tips in this section}}
'''Exercises in Terminal (slide 65):'''
 
1. Create a file using cat (some filename) and write some text in it as below. than use grep to find and display the line number and the line with the word Alan in the file.
 
        the best way to predict
 
        the future is to invent it
 
        –  Alan Kay
 
    {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |  
 
      $ cat > quote.txt <<"EOF" \ > the best way to predict \ > the future is to invent it
 
      >  - Alan Kay
 
      > EOF
 
      EOF mean end of file. Press enter to get a new line while writing text. With cat > filename you write the file content in the file quote.txt.
 
  
      Further use grep as below
 
      $ grep -in alan quote.txt
 
      3: - Alan Kay
 
      grep command option -
 
            - i to ignore case distinctions, so that characters that differ only in case match each other.
 
            - n for line number   
 
    |}
 
 
=== Processes and permissions === <!--T:8-->
 
 
'''Video:''' Slide 67 - 88 (22 pages), 7 min 40 sec (Text + Demo)
 
 
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
 
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
 
Text   
 
 
'''Quiz:'''
 
1. Which command can prevent other users not in your group from writing to input.dat?
 
  A: chmod u-w input.dat
 
  B: chmod o-w input.dat
 
  C: chmod g-w input.dat
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | B
 
    | Explanation: The chmod command changes file permission.
 
            u represents the user who owns the file.
 
            g means other users in your group.
 
            o stands for other users not in your group.
 
            -w means to remove the write permission.
 
      Therefore B is the correct answer.
 
    |}
 
  
 
[[File:Tip.png]]
 
[[File:Tip.png]]
Line 399: Line 95:
 
[[File:Important.png]]
 
[[File:Important.png]]
 
'''Warning: no warning in this section'''
 
'''Warning: no warning in this section'''
 
 
'''Exercises in Terminal (slide 89):'''
 
1. Create an empty file, make it read-only, make it executable.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      Create an empty file: touch file.txt.
 
      make it read-only: chmod a-w file.txt; chmod a-x file.txt; chmod a+r file.txt.
 
      make it executable: chmod a+x file.txt.
 
 
      Explanation: The touch command can be used to create an empty file. In this example it is file.txt.
 
          chmod a-w file.txt; chmod a-x file.txt; chmod a+r file.txt means to execute the three commands subsequently.
 
          chmod a-w file.txt removes the write permission for all users.
 
          chmod a-x file.txt removes the executable permission for all users.
 
          chmod a+r file.txt adds the read permission for all users.
 
          chmod a+x file.txt makes file.txt executable for all users.
 
    |}
 
 
2. Start a process (e.g. sleep 10m)
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      Use a second console to look at it in top.
 
      Kill it.
 
      Hint:
 
        To kill the started process (e.g. sleep 10m):
 
        1. Go to the terminal that started the process.
 
        2. Press Ctrl-C to kill it.
 
    |}
 
 
3. Start a process, bring it into background/foreground.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Hint:</strong>
 
    |-
 
    |
 
      To bring a process to background:
 
        Press Ctrl-Z (pause the process).
 
        Type bg (bring it to background).
 
      To bring a process to foreground:
 
        Type fg (bring it to foreground).
 
    |}
 
 
=== The vim text editor === <!--T:8-->
 
 
'''Video:''' Slide 91 - 99 (9 pages), 5 min 0 sec (Text + Demo) + 15 sec (Quiz)
 
 
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
 
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
 
Text
 
 
'''Quiz:'''
 
1. How to enter the insert mode of vim ?
 
  A: press <code>enter</code> key
 
  B: press <code>i</code> key
 
  C: press <code>Esc</code> key
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | B
 
    | Explanation: If you are not in the insert mode, the <code>i</code> key means insert and by pressing it you can enter the insert mode. On the other hand, the <code>Esc</code> key brings you out of the insert mode. The behavior of the <code>enter</code> key depends on in which mode of vim you are. If you are in the normal mode, you navigate to the next line. If you are in the insert mode already, you start a new line.
 
    |}
 
 
2. How would you open a file in read-only mode using the vim editor ?
 
  Hint: In terminal <code>man vim</code>
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | <code>$ vim -R filename</code>
 
    | 
 
    |}
 
 
[[File:Tip.png]]
 
'''Tips: If you forget which mode you are in while using vim, just keep pressing Esc.'''
 
 
[[File:Important.png]]
 
'''Warning: no warning in this section'''
 
 
 
'''Exercises in Terminal (slide 100):'''
 
1.  Create a vim file and write some text in it with insert (pressing <code>i</code>) and than undo and redo the changes.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      <code>$ vim test.txt</code>
 
      In <code>vim</code> editor press <code>i</code> to insert text and write few lines.
 
      Press <code>Esc</code> than press <code>u</code> (for undo) after that press <code>ctrl + r</code> on keyboard for redo.
 
        - <code>u</code>: undo last change (can be repeated to undo preceding commands).
 
        - <code>Ctrl-r</code>: Redo changes which were undone (undo the undos).
 
    |}
 
 
=== Shell scripting, environment variables === <!--T:8-->
 
 
'''Video:''' Slide 102 - 114 (13 pages), 7 min 0 sec (Text + Demo)
 
 
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
 
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
 
Text
 
 
'''Quiz:'''
 
1. Which bash command below assigns <code>"value"</code> to variable <code>var</code>?
 
  A: <code>var="value"</code>
 
  B: <code>var = "value"</code>
 
  C: <code>var=="value"</code>
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |    A
 
    | Explanation: The space character in bash is important. To assign value to a variable, there must not be any space characters in the assignment. Therefore, A is correct. B results in a bash syntax error. C assigns the value <code>=value</code> to variable <code>var</code>. The first <code>=</code> sign means assignment. The second <code>=</code> sign is part of the value. The two double-quotes around <code>value</code> state that <code>value</code> is a character string.
 
    |}
 
 
 
[[File:Tip.png]]
 
'''Tips: no tips in this section'''
 
 
[[File:Important.png]]
 
'''Warning: no warning in this section'''
 
 
 
'''Exercises in Terminal (slides 115 - 116) and solution (slide 117):'''
 
1. a. Write a script that
 
    b. Prints an environment variable
 
    c. Saves the output of the date command to a variable
 
    d. Sleeps briefly
 
    e. Prints the new and old date and time
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      One possible way to write the script is
 
      <syntaxhighlight lang="bash">
 
      #!/bin/bash
 
 
      echo "I am $USER, my home directory is $HOME"
 
 
      olddate=$(date)
 
      sleep 10s
 
      echo "old date: ${olddate}"
 
      echo "new date: $(date)"
 
      </syntaxhighlight>
 
 
      Explanation:
 
        <code>#!/bin/bash</code>: the shebang line for bash script
 
        <code>echo "I am $USER, my home directory is $HOME"</code>: the variables <code>$USER</code> and <code>$HOME</code> are your username and home directory, respectively. This line prints a sentence embedded with your username and home directory.
 
        <code>olddate=$(date)</code> assigns the output of the date command to the variable olddate as a string.
 
        <code>sleep 10s</code> puts the terminal into idle for 10 seconds.
 
        <code>echo "old date: ${olddate}"</code> prints the previously saved date in the olddate variable. The form of <code>${olddate}</code> is for using (or referencing) this variable.
 
        <code>echo "new date: $(date)"</code> prints the current date, in which the output of the command date will take the place of <code>$(date)</code>.
 
    |}
 
 
2. Find a way to execute a script without setting execute permissions.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | <code>bash script.sh</code>
 
    |  Explanation: <code>bash</code> will be used as an interpreter to execute <code>script.sh</code> and the commands contained in  <code>script.sh</code> will be executed sequentially.
 
    |}
 
 
3. Find out how to do other programming things in <code>bash</code> (e.g. functions, classes). How convenient do they look?
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
    To define a function <code>hello</code> in <code>bash</code>, which prints a message "hello, world" on the terminal. <code>bash script.sh</code>
 
      <syntaxhighlight lang="bash">
 
      function hello {
 
          echo "hello, world"
 
      }
 
      </syntaxhighlight>
 
    To use this function in <code>bash</code> (after defining it):
 
    <syntaxhighlight lang="bash">
 
      hello
 
      </syntaxhighlight>
 
    |}
 
 
4. Look at different ways you can define <code>if</code> conditions.
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      Both single square brackets <code>[]</code> and double square brackets <code>[[]]</code> can be used to define <code>if</code> conditions. But the effects are different. For example, we define a variable <code>str</code> by using a string with spaces:
 
      <syntaxhighlight lang="bash">
 
        str="a  b"
 
      </syntaxhighlight>
 
      The <code>if</code> condition with double square brackets works fine.
 
      <syntaxhighlight lang="bash">
 
      if [[ $str = "a  b" ]]; then
 
          echo "it works"
 
      fi
 
      </syntaxhighlight>
 
      However, the <code>if</code> condition with single square brackets will emit a syntax error.
 
      <syntaxhighlight lang="bash">
 
      if [ $str = "a  b" ]; then
 
          echo "it works"
 
      fi
 
      </syntaxhighlight>
 
      To have the correct syntax for <code>if</code> condition with single square brackets, the variable <code>str</code> must be double quoted inside the <code>if</code> condition.
 
      <syntaxhighlight lang="bash">
 
      if [ "$str" = "a  b" ]; then
 
          echo "it works"
 
      fi
 
      </syntaxhighlight>
 
    |}
 
 
5. Find out what different types of quotes (single <code>'</code> vs. double <code>"</code>) do?
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      single quote <code>'</code> gives literal string, the variable will not be interpreted, e.g.
 
      <syntaxhighlight lang="bash">
 
      var=abc
 
      echo '$var'     
 
      </syntaxhighlight>
 
      This script prints the literal string <code>$var</code> (instead of its value <code>abc</code>) to terminal.
 
      double quote <code>"</code> allows the variable to be interpreted, e.g.
 
      <syntaxhighlight lang="bash">
 
      var=abc
 
      echo "$var"
 
      </syntaxhighlight>
 
      This script prints the value of <code>var</code>, which is <code>abc</code> (instead of the literal string <code>$var</code>) to terminal.
 
    |}
 
 
6. create an shell variable MYIDENTITY and export it as below:
 
    <code>$ export MYIDENTITY=whoami</code>
 
    How will you list the shell variable MYIDENTITY?
 
    Execute the shell variable MYIDENTITY, what is the output?
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |
 
      you can list the variable by using the echo command as follows
 
      <syntaxhighlight lang="bash">
 
        $ echo $MYIDENTITY
 
        whoami
 
      </syntaxhighlight>
 
      The arguments passed to echo are printed to the standard output.
 
      <syntaxhighlight lang="bash">
 
        $ $MYIDENTITY   
 
        username
 
      </syntaxhighlight>
 
      The shell variable upon execution runs the command <code>whoami</code>, which is assigned to it. <code>whoami</code> command prints the user name of the effective user ID
 
    |}
 
 
=== System configuration files === <!--T:8-->
 
 
'''Video:''' Slide 119 - 128 (10 pages), 6 min 50 sec (Text + Demo)
 
 
<gallery mode="packed" heights="250" perrow="1">
 
Linux intro.png|
 
</gallery>
 
 
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
 
 
Text
 
 
'''Quiz:'''
 
1. In which system file could you find the CPU information of a Linux computer? 
 
  A: <code>/dev/cpuinfo</code>
 
  B: <code>/sys/cpuinfo</code>
 
  C: <code>/proc/cpuinfo</code>
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    |    C
 
    | Explanation: The <code>/dev</code> directory contains special files that represent devices, e.g. hard drive. None of them, however, gives the CPU information. The <code>/sys</code> directory is a virtual file system that stores the device information on a Linux system. However, the <code>/sys/cpuinfo</code> does not exist at all. The <code>/proc</code> directory is also a virtual file system that contains information about running process on a Linux system. From the file <code>/proc/cpuinfo</code> you can obtain the CPU information.
 
    |}
 
 
[[File:Tip.png]]
 
'''Tips: no tips in this section'''
 
 
[[File:Important.png]]
 
'''Warning: Be very careful, when editing configuration files. A faulty configuration file may prevent a user from login to computer.'''
 
  
 
[[File:Info.png]]
 
[[File:Info.png]]
 
'''Exercises in Terminal: no exercises in this section'''
 
'''Exercises in Terminal: no exercises in this section'''
  
=== Various tips === <!--T:8-->
+
{{example box| Solve the following system. }}
  
'''Video:''' Slide 130 - 136 (7 pages), 5 min 10 sec (Text + Demo)
+
{{Note|Again, it may be true}}
  
<gallery mode="packed" heights="250" perrow="1">
+
=== Quizes ===
Linux intro.png|
 
</gallery>
 
  
 +
<quiz>
 +
{Bulgaria and Rumania joined the
 +
European Union in 2007.
 +
|type="()"}
 +
+ TRUE.
 +
- FALSE.
 +
</quiz>
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
+
{| border=0 cellspacing=0 cellpadding=5|| style="width:700px"
 +
| bgcolor=#ccf |
 +
<quiz display=simple>
 +
{Complete the text from the Wikipedia article on [[w:Aristotle|Aristotle]].
 +
|type="{}"}
 +
<big>'''Early Years:'''</big>
 +
Aristotle was born in { Stageira|stageira _8 } in Chalcidice. His parents were
 +
{ Phaestis|phaestis _8 } and { Nicomachus|nicomachus _10 }, who became physician
 +
to King Amyntas of Macedon.
  
Text
+
Aristotle was educated as a member of the aristocracy. At about the age of
 +
{ eighteen|18 _8}, he went to { Athens|athens _6 } to continue his education
 +
at { Plato|pluto _5 }'s Academy.
 +
<br>
  
 +
<big>'''Later Years:'''</big>
 +
Aristotle remained at the Academy for nearly twenty years, not leaving until
 +
after Plato's death in { 347 _3 } BC.
 +
</quiz>
 +
|}
  
'''Quiz:'''
+
Select only one correct answer and no incorrect answers.
1. How will you find a specific command in history ? HINT: use grep with history, how to use it? 
 
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | 
 
      history | grep cd
 
    |}
 
  
2. How can you compare two files and display a list of the difference? HINT: <code>man diff</code> 
+
'''Type 1'''
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
+
{{Question_Temp|box1|title=What kind of fish are these?|collapsed=yes}}
    | <strong>Answer:</strong>
+
{{Question_Temp|box2|title=How many HPC center's are participating within the scope of #HPC.NRW project?}}
    |-
+
{{Question_Temp|box3|title=How many HPC center's are participating within the scope of #HPC.NRW project?}}
    |  
+
{{Question_Temp|box4|title=What kind of fish are these?|collapsed=yes}}
      diff file1 file2
 
    |}
 
  
[[File:Tip.png]]
+
'''Type 2'''
'''Tips: Please make backups regularly!'''
+
<div class="toccolours mw-collapsible mw-collapsed" style="width:1000px; overflow:auto;">
 +
<div style="font-weight:bold;line-height:1.6;"> What kind of fish are these?</div>
 +
<div class="mw-collapsible-content">
 +
<quiz display=simple>
 +
{<youtube>https://www.youtube.com/watch?v=DvjeIqkFMaE</youtube>
 +
| type="()" }
 +
+ Herring
 +
||This is many Herring swimming in uniform formation in the Bearing Sea by the light of the silvery moon.  This swarm was photographed by the great artic explorer who fell overboard in 1887 with his camera and took this flash picture of the fish of the sea.
 +
- Salmon
 +
- Tunafish
 +
- Goldfish
 +
</quiz>
 +
</div></div>
  
[[File:Important.png]]
 
'''Warning: Please make backups regularly!'''
 
  
 +
'''Type 3'''
 +
<quiz display=simple>
 +
{<youtube>https://www.youtube.com/watch?v=DvjeIqkFMaE</youtube>
 +
What kind of fish are these?
 +
| type="()" }
 +
+ Herring
 +
||This is many Herring swimming in uniform formation in the Bearing Sea by the light of the silvery moon.  This swarm was photographed by the great artic explorer who fell overboard in 1887 with his camera and took this flash picture of the fish of the sea.
 +
- Salmon
 +
- Tunafish
 +
- Goldfish
  
'''Exercises in Terminal (slides 137):'''
+
{How many HPC center's are participating within the scope of #HPC.NRW project?
1. Find out the number of CPUs and amount of memory you have.
+
|type="()"}
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
+
+ 12
    | <strong>Answer:</strong>
+
|| There are 3 Tier-2 centers and 9 Tier-3 centers paticipating.
    |-
+
- 13
    |
+
|| Check the https://www.dh.nrw/ #HPC.NRW website and count correctly
      There are multiple ways to find out the number of CPUs and amount of memory on Linux computer.  
+
- 3
      the number of CPUs.
+
|| Are you for real?
      1. <code>lscpu</code>: the following is an example output of the <code>lscpu</code> command:
+
- N/A
      <syntaxhighlight lang="bash">
+
|| Thats impossible as otherwise we won't be having this conversation.
        CPU(s):               40
+
</quiz>
        On-line CPU(s) list:  0-39
 
      </syntaxhighlight lang="bash">
 
      Brief description:
 
            <code>CPU(s):                40</code>: this computer contains 40 CPU cores.
 
            <code>On-line CPU(s) list:  0-39</code>: all 40 CPU cores are active.
 
      2. <code>grep -c processor /proc/cpuinfo</code>: This command uses  <code>grep</code> to count the number of lines that match  <code>processor</code> in  <code>/proc/cpuinfo</code>. The following is an example output:
 
      <syntaxhighlight lang="bash">
 
        $ grep -c processor /proc/cpuinfo
 
        40
 
      </syntaxhighlight>
 
      As can be seen, there are 40 CPU cores in this computer.
 
      the amount of memory
 
      1. <code>vmstat -s</code>: the following is an example output of the <code>vmstat</code> command:
 
        <syntaxhighlight lang="bash">
 
          196698736 K total memory
 
          4982596 K used memory
 
        </syntaxhighlight>
 
        <code>vmstat</code> reports the virtual memory statistics.
 
        The <code>-s</code> option displays a table for memory statistics.
 
        In this example there are 196 GB memory in total in the computer and 5 GB memory is used.
 
      2. <code>grep Mem[TF] /proc/meminfo</code>: This command uses <code>grep</code> to search for either <code>MemT</code> or <code>MemF</code> in <code>/proc/meminfo</code> and the following is an example output:
 
        <syntaxhighlight lang="bash">
 
          $ grep Mem[TF] /proc/meminfo
 
          MemTotal:      196698740 kB
 
          MemFree:        113479460 kB
 
        </syntaxhighlight>
 
          As can be seen, MemT and MemF are matched by MemTotal and MemFree, respectively. The total amount of memory in the computer is 196 GB and there are 113 GB are freely available.
 
    |
 
    |}
 
  
2. Permanently change your vim color scheme.
+
'''Type 4'''
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 
    | <strong>Answer:</strong>
 
    |-
 
    | 
 
      Your personal vim configuration file is ~/.vimrc. In this file you can change the vim color scheme permanently. For example, the following setting uses the desert color scheme:
 
      <code>colorscheme desert</code>
 
      But beware of this permanent change of vim color scheme, because different color schemes may be preferred by different people. The vim color scheme recommended by others may not the best choice for you.
 
    |}
 
  
=== Beyond the cluster === <!--T:8-->
+
Answer A: The no of HPC center's are:
 +
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 +
| <strong>#HPC.NRW</strong>
 +
|-
 +
| There are 3 Tier-2 centers and 9 Tier-3 centers paticipating.
 +
|}
  
'''Video:''' Slide 139 - 141 (3 pages), 2 min 30 sec (Text)
+
<div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;" data-expandtext="Expand" data-collapsetext="Collapse">
 +
<div style="font-weight:bold;line-height:1.6;">#HPC.NRW</div>
 +
<div class="mw-collapsible-content">
 +
There are 3 Tier-2 centers and 9 Tier-3 centers paticipating.
 +
</div></div>
  
<gallery mode="packed" heights="250" perrow="1">
+
  A sample question to be used for quiz?
Linux intro.png|
+
  A. option a
</gallery>
+
  B. option b
 +
  C. option c
 +
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
 +
  | <strong>Answer</strong>
 +
  |-
 +
  |
 +
    B
 +
    Explanation -
 +
        1. ......
 +
        2. ......
 +
  |}
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]
+
  A sample question to be used for quiz?
 +
  A. option a
 +
  B. option b
 +
  C. option c
  
Text
+
  <div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;" data-expandtext="Expand" data-collapsetext="Collapse">
 +
  <div style="font-weight:bold;line-height:1.6;">Answer</div>
 +
  <div class="mw-collapsible-content">
 +
    B
 +
    Explanation -
 +
        1. ......
 +
        2. ......
 +
  </div></div>
  
[[File:Tip.png]]
+
{{Collapse|1=Discussion text to be put into box.|float=left|width=30em}}
'''Tips: no tips in this section'''
 
  
[[File:Important.png]]
+
'''Example Code:'''
'''Warning: no warning in this section'''
 
  
[[File:Info.png]]
+
<syntaxhighlight lang="c">
'''Exercises in Terminal: no exercises in this section'''
+
for(int i=0; i<4; i++){
 +
    dosomething();
 +
}
 +
</syntaxhighlight>
  
=== Linux in HPC === <!--T:10-->
+
<syntaxhighlight lang="bash">
 +
STR="HELLO WORLD!"
 +
echo ${STR,}  #=> "hELLO WORLD!" (lowercase 1st letter)
 +
echo ${STR,,}  #=> "hello world!" (all lowercase)
  
'''Video:''' Slide 3 - 40 (38 pages), 14 min 35 sec (Text)
+
STR="hello world!"
 +
echo ${STR^}  #=> "Hello world!" (uppercase 1st letter)
 +
echo ${STR^^}  #=> "HELLO WORLD!" (all uppercase)
 +
</syntaxhighlight>
  
[[File:Linux intro.png]]
+
'''Example Table '''
 +
{| class="wikitable" style=""
 +
!colspan="2" | Linux ([[Debian]]) || colspan="2"| Windows ([[10]])
 +
|-
 +
! Pros || Cons || Pros || Cons
 +
|-
 +
| Linux is better || No cons || Looks colourful || will cost money
 +
|-
 +
| Linux || No cons || windows || slow
 +
|-
 +
|  Linux || No cons || windows | windows down
 +
| slow to start with
 +
|-
 +
|  || || complicated start-up
 +
|}
  
 +
{{information table
 +
|description= table to use
 +
|date={{Hpccalendar}}
 +
|source= '''HPC.NRW'''
 +
|author= '''HPC.NRW'''
 +
|permission=no
 +
|other_versions= no
 +
|license-information-permission=no
 +
}}
  
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_HPC/Linux_HPC.pdf Linux in HPC]
+
==Graphs==
  
Text
+
What is your role? Show with a Piechart
 +
{{Graph:Piechart|legend=Roles|radius=75|innerradius=45|values= [
 +
      {"x": "Bachelor/Master student (18%)","y": 0.18},
 +
      {"x": "PhD student (43%)","y": 0.43},
 +
      {"x": "Postdoc/Senior researcher (29%)","y": 0.29},
 +
      {"x": "Professor (3%)","y": 0.03},
 +
      {"x": "Other (7%)","y": 0.07}
 +
    ]|rangeliteral={{ColourScheme3}}
 +
}}
  
'''Quiz:'''
+
In which field are you working? Show with a Barchart
  1. Which command you can use to do a secure copy from the Cluster to you local Linux machine?
+
{{Graph:Barchart|width=320|height=200|color="rgb(102,138,255)"|values= [
    Hint:man scp
+
        {"x": "Architecture", "y": 0.00},
  {| role="presentation" class="wikitable mw-collapsible mw-collapsed"
+
        {"x": "Engineering",  "y": 0.28},
    | <strong>Answer:</strong>
+
        {"x": "Life sciences""y": 0.17},
    |-
+
        {"x": "Math/Computer science",  "y": 0.24},
    |
+
        {"x": "Medicine",  "y": 0.03},
      scp
+
        {"x": "Natural sciences",  "y": 0.47},
    |}
+
        {"x": "Social sciences",  "y": 0.06},
 +
        {"x": "Other",  "y": 0.05}
 +
]
 +
}}
  
2. Label the interface elements in the terminal:
+
How important are the following programming languages for your work? Show with a Piechart
    1. shell command
+
{|
    2. current prompt
+
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=Aachen|radius=60|innerradius=0|values= [
    3. previous prompt
+
      {"x": "Physik (24)","y": 13.71},
    4. cursor
+
      {"x": "Informatik, System- und Elektrotechnik (56)","y": 32},
    5. login message
+
      {"x": "Chemie (21)","y": 12},
    6. command output
+
      {"x": "Biologie (6)","y": 3.43},
 
+
      {"x": "Maschinenbau  und  Wirtschaftsingenieurwesen (26)","y": 14.86},
+
      {"x": "Wärme- und Verfahrenstechnik (18)","y": 10.29}, 
[[File:Linux_hpc_quiz.png]]
+
      {"x": "Mathematik (2)","y": 1.14},
 
+
      {"x": "Geowissenschaften (5)","y": 2.86},
[[File:Tip.png]]
+
      {"x": "Materialwissenschaft und Werkstofftechnik (9)","y": 5.14},
'''Tip: Integrated in slides.'''
+
      {"x": "Medizin (3)","y": 1.71},
 
+
      {"x": "Geisteswissenschaften (1)","y": 0.57},
[[File:Important.png]]
+
      {"x": "Bauingenieurwesen und Architektur (1)","y": 0.57}
'''Warning: Integrated in slides.'''
+
    ]|rangeliteral={{ColourScheme1}}
 
+
}}
 
+
|style="width:420px;display:inline-block;"|{{Graph:Piechart|legend=Paderborn|radius=60|innerradius=0|values= [
'''Exercises for Linux in HPC''': GO CP2K GO!
+
      {"x": "Physik (9)","y": 15.52},
   
+
      {"x": "Informatik, System- und Elektrotechnik (24)","y": 41.38},
  CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. In this exercise we are going to
+
      {"x": "Chemie (11)","y": 18.97},
    1. create CP2K input files with different cutoff values from a template input for simulation of 32 water molecules in a box using density functional theory (DFT) calculation.
+
      {"x": "Maschinenbau und Wirtschaftsingenieurwesen (5)","y": 8.62},
    2 .analyse the simulation output files and summarize some important results.
+
      {"x": "Wärme- und Verfahrenstechnik (5)","y": 8.62},
+
      {"x": "Mathematik (2)","y": 3.45},
'''Create CP2K input files'''
+
      {"x": "Materialwissenschaft und Werkstofftechnik (1)","y": 1.72},
The CP2K template input file for simulation of 32 water molecules in a box using DFT calculation can be found in the <code>Ex_LinuxHPC/01_CreateInput</code> directory and the file name is <code>template.inp</code>.
+
      {"x": "Sozial-  und  Verhaltenswissenschafte (1)","y": 1.72},
A placeholder <code>__CUTOFF__</code> is set on line 7 of this file.
+
    ]|rangeliteral={{ColourScheme1}}
 
+
}}
      <code>CUTOFF __CUTOFF__</code>
+
|style="width:420px;display:inline-block;"|{{Graph:Piechart|legend=Fortran|radius=50|innerradius=0|values= [
 
+
      {"x": "Not important (50.29%)","y": 50.29},
With smaller cutoff value the DFT calculation runs faster, but the results may be less accurate. With larger cutoff value, on the other hand, the results become more accurate, but the DFT calculation can be slower.
+
      {"x": "Not that important (6.86%)","y": 6.86},
In this exercise we create the CP2K input files based on the template (<code>template.inp</code>) for a range of different cutoff values, e.g. from 250 to 350 with a step size of 10. Please write a bash script that:
+
      {"x": "Neutral (11.43%)","y": 11.43},
     1. creates individual subdirectories for the simulations with different cutoff values
+
      {"x": "Important (8%)","y": 8},
    2. in each subdirectory creates the CP2K input file from the template file with the placeholder <code>__CUTOFF__</code> being replaced by an appropriate cutoff value. The cutoff values are from 250 to 350 and the increment
+
      {"x": "Very important (23.43%)","y": 23.43}
      is 10. e.g. the cutoff in the first input file may have
+
    ]|rangeliteral={{ColourScheme3}}
 
+
}}
          <code>CUTOFF 250</code>
+
|-
 
+
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=Java|radius=50|innerradius=0|values= [
     and the cutoff in the second input file may look like
+
      {"x": "Not important (60.59%)","y": 60.59},
 
+
      {"x": "Not that important (10%)","y": 10},
          <code>CUTOFF 260</code>
+
      {"x": "Neutral (15.29%)","y": 15.29},
 
+
      {"x": "Important (2.94%)","y": 2.94},
    and so on until <code>CUTOFF 350</code> in the last CP2K input file.
+
      {"x": "Very important (11.18%)","y": 11.18}
 
+
     ]|rangeliteral={{ColourScheme4}}
Note: Due to the time limitation we cannot perform all these CP2K simulations during this exercise. However, the example CP2K input (<code>run.inp</code>) and output (<code>run.out</code>) files with different cutoff values can be
+
}}
found in <code>Ex_LinuxHPC/02_AnalyseOutput</code>.
+
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=Julia|radius=50|innerradius=0|values= [
 
+
      {"x": "Not important (76.33%)","y": 76.33},
'''Analyse CP2K output files'''
+
      {"x": "Not that important (7.69%)","y": 7.69},
+
      {"x": "Neutral (7.1%)","y": 7.1},
In the CP2K output file, e.g.<code>run.out</code>, the most important information is printed after every simulation step. For example:
+
      {"x": "Important (3.55%)","y": 3.55},
 
+
      {"x": "Very important (5.33%)","y": 5.33}
<syntaxhighlight lang="bash">
+
     ]|rangeliteral={{ColourScheme5}}
*******************************************************************************
+
}}
ENSEMBLE TYPE                =                                             NVE
+
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=Matlab|radius=50|innerradius=0|values= [
STEP NUMBER                  =                                               1
+
      {"x": "Not important (41.9%)","y": 41.9},
TIME [fs]                    =                                         0.500000
+
      {"x": "Not that important (6.7%)","y": 6.7},
CONSERVED QUANTITY [hartree] =                              -0.545718508103E+03
+
      {"x": "Neutral (12.85%)","y": 12.85},
 
+
      {"x": "Important (12.29%)","y": 12.29},
                                              INSTANTANEOUS            AVERAGES
+
      {"x": "Very important (26.26%)","y": 26.26}
CPU TIME [s]                =                        8.34                8.34
+
    ]|rangeliteral={{ColourScheme6}}
ENERGY DRIFT PER ATOM [K]    =        -0.172713513639E+02  0.000000000000E+00
+
}}
POTENTIAL ENERGY[hartree]   =         -0.545966997800E+03  -0.545966997800E+03
+
|-
KINETIC ENERGY [hartree]    =          0.248489696633E+00  0.248489696633E+00
+
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=OpenCL|radius=50|innerradius=0|values= [
TEMPERATURE [K]              =                    550.644              550.644
+
      {"x": "Not important (69.94%)","y": 69.94},
*******************************************************************************
+
      {"x": "Not that important (9.82%)","y": 9.82},
</syntaxhighlight>
+
      {"x": "Neutral (15.34%)","y": 15.34},
 
+
      {"x": "Important (1.84%)","y": 1.84},
for step number 1 (see the line of <code>STEP NUMBER</code> above). Among these data the most useful results are:
+
      {"x": "Very important (3.07%)","y": 3.07}
    1. the time step for the simulation on the line beginning with <code>TIME [fs]</code>.
+
    ]|rangeliteral={{ColourScheme1}}
    2. the potential energy for the step on the line beginning with <code>POTENTIAL ENERGY[hartree]</code>. Please note the energy value given in the column of <code>INSTANTANEOUS</code> is relevant.
+
}}
 
+
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=Python|radius=50|innerradius=0|values= [
In this exercise please:
+
      {"x": "Not important (3.23%)","y": 3.23},
    1. write a script that summarizes and prints the time step and potential energy for the CP2K output file.
+
      {"x": "Not that important (5.38%)","y": 5.38},
    2. create a bash script to loop through all CP2K output files and print the time step and potential energy for each one automatically.
+
      {"x": "Neutral (8.6%)","y": 8.6},
 +
      {"x": "Important (16.67%)","y": 16.67},
 +
      {"x": "Very important (66.13%)","y": 66.13}
 +
    ]|rangeliteral={{ColourScheme2}}
 +
}}
 +
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=R|radius=50|innerradius=0|values= [
 +
      {"x": "Not important (43.6%)","y": 43.6},
 +
      {"x": "Not that important (11.05%)","y": 11.05},
 +
      {"x": "Neutral (12.79%)","y": 12.79},
 +
      {"x": "Important (15.12%)","y": 15.12},
 +
      {"x": "Very important (17.44%)","y": 17.44}
 +
    ]|rangeliteral={{ColourScheme3}}
 +
}}
 +
|-
 +
|style="width:340px;display:inline-block;"|{{Graph:Piechart|legend=Other|radius=50|innerradius=0|values= [
 +
      {"x": "Not important (65.67%)","y": 65.67},
 +
      {"x": "Not that important (2.99%)","y": 2.99},
 +
      {"x": "Neutral (23.13%)","y": 23.13},
 +
      {"x": "Important (1.49%)","y": 1.49},
 +
      {"x": "Very important (6.72%)","y": 6.72}
 +
    ]|rangeliteral={{ColourScheme4}}
 +
}}
 +
|}

Latest revision as of 17:28, 13 October 2020

Introduction text here.

Video

HPC.NRW
HPC.NRW
table name
Kontakt RWTH Aachen
Bundesland Nord Rhein Wesfallen
Beginn 2019
Ende 2021
activities
AP2 Arbeitspaket 2
AP3 Arbeitspaket 3
AP4 Arbeitspaket 4
Institutes 13
- ***
- ***
- ***
- ***
- ***






























Template


THE EVENT FOR HIGH PERFORMANCE COMPUTING, MACHINE LEARNING AND DATA ANALYTICS

:en:Wikipedia:Manual of Style/Layout


Warning:  no warning in this section


Info:  no tips in this section


Tip.png Tips: no tips in this section

Important.png Warning: no warning in this section

Info.png Exercises in Terminal: no exercises in this section

Example
Example:
Solve the following system. 

Note: Again, it may be true

Quizes

  

Bulgaria and Rumania joined the European Union in 2007.

TRUE.
FALSE.


Complete the text from the Wikipedia article on Aristotle.

Early Years:
Aristotle was born in

in Chalcidice. His parents were

and

, who became physician
to King Amyntas of Macedon.
Aristotle was educated as a member of the aristocracy. At about the age of

, he went to

to continue his education
at

's Academy.

Later Years:
Aristotle remained at the Academy for nearly twenty years, not leaving until
after Plato's death in

BC.

Select only one correct answer and no incorrect answers.

Type 1


How many HPC center's are participating within the scope of #HPC.NRW project? (edit)

12
13
3
N/A



How many HPC center's are participating within the scope of #HPC.NRW project? (edit)



Type 2

What kind of fish are these?

Herring
Salmon
Tunafish
Goldfish


Type 3

1

What kind of fish are these?

Herring
Salmon
Tunafish
Goldfish

2 How many HPC center's are participating within the scope of #HPC.NRW project?

12
13
3
N/A


Type 4

Answer A: The no of HPC center's are:

#HPC.NRW

There are 3 Tier-2 centers and 9 Tier-3 centers paticipating.

 A sample question to be used for quiz?
 A. option a
 B. option b
 C. option c
 A sample question to be used for quiz?
 A. option a
 B. option b
 C. option c
Answer
    B
    Explanation - 
       1. ......
       2. ......

Example Code:

for(int i=0; i<4; i++){ 
    dosomething();
}
STR="HELLO WORLD!"
echo ${STR,}   #=> "hELLO WORLD!" (lowercase 1st letter)
echo ${STR,,}  #=> "hello world!" (all lowercase)

STR="hello world!"
echo ${STR^}   #=> "Hello world!" (uppercase 1st letter)
echo ${STR^^}  #=> "HELLO WORLD!" (all uppercase)

Example Table

Linux (Debian) Windows (10)
Pros Cons Pros Cons
Linux is better No cons Looks colourful will cost money
Linux No cons windows slow
Linux No cons windows down slow to start with
complicated start-up


Description table to use
Date
File source HPC.NRW
Author HPC.NRW
license-information-permission
no
Other Versions

no

Graphs

What is your role? Show with a Piechart

In which field are you working? Show with a Barchart

How important are the following programming languages for your work? Show with a Piechart