Making Script File For Quantum Espresso
When we run our Quantum espresso calculation in a supercomputer, we use a bash script (script.sh) which looks similar to the script given below
If you are a beginner, then you might be wondering about the parameters that you should give like the number of nodes (nodes) , tasks per node, number of processors -np for your calculation. So here I am going to share my analysis data for a ZnO 4X4 input file, from where you can have a better understanding of how it's working.
Here you can see that I have run the calculation in a number of nodes starting from 1 to 16 for the different number of processors np starting from 8 to 512 with tasks per node 10, 20 & 32.
#!/bin/bash
#SBATCH --job-name=ufslab
#SBATCH --nodes=3
#SBATCH --tasks-per-node=40
#SBATCH --partition=standard
#SBATCH --output=scf_cn65.out
#SBATCH --time=72:00:00
module load intel/2018.5.274
module load quantum_espresso_6.4.1
time mpirun -np 128 pw.x <scf.in
ZnO (4X4) Supercell |
Calculation time in second for different script parameter@ZnO_4X4 |
So from the result, we can conclude that
- Increasing the number of processors will not always decrease the time taken for the calculation. Sometimes it can even increase our calculation time. So we have to consider the number of processors according to the size of our system.
- If we look at the time taken with an increase in number of nodes, then we can see that in most cases increase it decreases our calculation time significantly. But in a supercomputer, you may need to wait in a queue if you demand a higher number of nodes since it's subjected to availability.
- But you can also see that increasing the number of tasks per node can also decrease your calculation time significantly.
- In our case, for the ZnO 4x4 supercell, if we chose only 4 nodes with 128 processors & tasks per node 32, our 1st iteration is complete after 32 sec only which can be a good choice for us.
- If you assign fewer processors but a large number of nodes then work will not distributed across all nodes. So in our case, we can not assign 3 nodes with 32 processors. if we assign, then it will run up to in 2 nodes.
You can check the number of nodes and processors utilized in your calculation from the scf output file
I hope you find this post to be helpful. Please write your query and suggestion in the comment section so that we can discuss related to it to reach at the solution.
Thank you for your time.
This comment has been removed by the author.
ReplyDelete