Introduction to Linux in HPC/Linux in HPC

From HPC Wiki
Introduction to Linux in HPC/Linux in HPC
Jump to: navigation, search



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