Difference between revisions of "Introduction to Linux in HPC/Linux in HPC"

From HPC Wiki
Introduction to Linux in HPC/Linux in HPC
Jump to navigation Jump to search
Line 3: Line 3:
 
__TOC__
 
__TOC__
  
{{Infobox table
+
{{Infobox_linux_introduction}}
| REAL-NAME    = HPC.NRW
+
 
| image  =  Hpc.nrw_small.png ‎
 
| Feldnamehead1 = Other HPC Courses
 
| Feldname2 = GPU      | Daten3 = Introduction to GPU Programming
 
| Feldname3 = GPROF    | Daten4 = [https://hpc-wiki.info/hpc/GPROF_Tutorial Gprof Tutorial]
 
| Feldnamehead2 = Introduction to Linux in HPC
 
| Feldname5 = 1. | Daten6 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Historical_Background Historical Background]
 
| Feldname6 = 2. | Daten7 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/The_Command_Line The Command Line]
 
| Feldname7 = 3. | Daten8 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Directory_structure Directory structure]
 
| Feldname8 = 4. | Daten9 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Files Files]
 
| Feldname9 = 5. | Daten10 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Text_display_search Text display search]
 
| Feldname10 = 6. | Daten11 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Processes_and_permissions Processes and permissions]
 
| Feldname11 = 7. | Daten12 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/The_vim_text_editor The vim text editor]
 
| Feldname12 = 8. | Daten13 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Shell_scripting_environment_variables Shell scripting environment variables]
 
| Feldname13 = 9. | Daten14 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/System_configuration_files System configuration files]
 
| Feldname14 = 10. | Daten15 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Various_tips Various tips]
 
| Feldname15= 11. | Daten16 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Beyond_the_cluster Beyond the cluster]
 
| Feldname16= 12. | Daten17 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/Linux_in_HPC Linux in HPC]
 
| Feldname17= 13. | Daten18 = [https://hpc-wiki.info/hpc/Introduction_to_Linux_in_HPC/SSH_Login SSH Login]
 
}}
 
  
 
=== Video === <!--T:5-->
 
=== Video === <!--T:5-->

Revision as of 13:15, 26 October 2020



HPC.NRW
HPC.NRW
Other HPC Courses
1. Gprof Tutorial
2. OpenMP in Small Bites
Introduction to Linux in HPC
1. Background and History
2. The Command Line
3. Directory structure
4. Files
5. Text display and search
6. Users and permissions
7. Processes
8. The vim text editor
9. Shell scripting
10. Environment variables
11. System configuration
12. SSH Connections
13. SSH: Graphics and File Transfer
14. Various tips


Video


Quiz

1. Which command you can use to do a secure copy from the Cluster to you local Linux machine?
Hint:man scp

Click and submit to see the answer

2. Label the interface elements in the terminal:

Linux hpc quiz.png

1. shell command
2. current prompt
3. previous prompt
4. cursor
5. login message
6. command output
Click and submit to get answer


Info:  Integrated in slides


Warning:  Integrated in slides

Exercises for Linux in HPC: GO CP2K GO!

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
   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.
   2 .analyse the simulation output files and summarize some important results.

Create CP2K input files
The CP2K template input file for simulation of 32 water molecules in a box using DFT calculation can be found in the Ex_LinuxHPC/01_CreateInput directory and the file name is template.inp.
A placeholder __CUTOFF__ is set on line 7 of this file.
     CUTOFF __CUTOFF__
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.
In this exercise we create the CP2K input files based on the template (template.inp) 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:
   1. creates individual subdirectories for the simulations with different cutoff values
   2. in each subdirectory creates the CP2K input file from the template file with the placeholder __CUTOFF__ being replaced by an appropriate cutoff value. The cutoff values are from 250 to 350 and the increment 
      is 10. e.g. the cutoff in the first input file may have
         CUTOFF 250
   and the cutoff in the second input file may look like
         CUTOFF 260
   and so on until CUTOFF 350 in the last CP2K input file.
Note: Due to the time limitation we cannot perform all these CP2K simulations during this exercise. However, the example CP2K input (run.inp) and output (run.out) files with different cutoff values can be 
found in Ex_LinuxHPC/02_AnalyseOutput. 
Analyse CP2K output files

In the CP2K output file, e.g.run.out, the most important information is printed after every simulation step. For example:
 *******************************************************************************
 ENSEMBLE TYPE                =                                              NVE
 STEP NUMBER                  =                                                1
 TIME [fs]                    =                                         0.500000
 CONSERVED QUANTITY [hartree] =                              -0.545718508103E+03

                                              INSTANTANEOUS             AVERAGES
 CPU TIME [s]                 =                        8.34                 8.34
 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
 TEMPERATURE [K]              =                     550.644              550.644
 *******************************************************************************
for step number 1 (see the line of STEP NUMBER above). Among these data the most useful results are:
   1. the time step for the simulation on the line beginning with TIME [fs].
   2. the potential energy for the step on the line beginning with POTENTIAL ENERGY[hartree]. Please note the energy value given in the column of INSTANTANEOUS is relevant.
In this exercise please:
   1. write a script that summarizes and prints the time step and potential energy for the CP2K output file.
   2. create a bash script to loop through all CP2K output files and print the time step and potential energy for each one automatically.


Previous Page
Main Menu Page
Next Page