From 85be0a3a0ccbc50709798a3ce27e72a1e332b2b0 Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Tue, 22 Oct 2019 22:03:50 +0200 Subject: [PATCH] New possibility of "dry run" If nstep=0, pw.x performs a quick "dry run" with fast initializations and nothing else. Simpler alternative to starting with a "prefix".EXIT file present in the scratch directory. The nstep=0 case was not usable anyway. --- PW/Doc/INPUT_PW.def | 4 +++- PW/Doc/user_guide.tex | 4 +++- PW/src/run_pwscf.f90 | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/PW/Doc/INPUT_PW.def b/PW/Doc/INPUT_PW.def index 7f42a87ab..ad45ac4be 100644 --- a/PW/Doc/INPUT_PW.def +++ b/PW/Doc/INPUT_PW.def @@ -179,7 +179,9 @@ input_description -distribution {Quantum Espresso} -package PWscf -program pw.x var nstep -type INTEGER { info { number of molecular-dynamics or structural optimization steps - performed in this run + performed in this run. If set to 0, the code performs a quick + "dry run", stopping just after initialization. This is useful + to check for input correctness and to have the summary printed. } default { 1 if @ref calculation == 'scf', 'nscf', 'bands'; diff --git a/PW/Doc/user_guide.tex b/PW/Doc/user_guide.tex index e41b818ac..22b736bb9 100644 --- a/PW/Doc/user_guide.tex +++ b/PW/Doc/user_guide.tex @@ -340,7 +340,9 @@ the working directory is the directory where the executable is! The advantage of this procedure is that all files are properly closed, whereas just killing the process may leave data and output files in an unusable state. If you start the execution with the EXIT file already -in place, the code will stop after initialization. This is useful to have a quick check of the correctness of the input. +in place, the code will stop after initialization. Alternatively: +set \texttt{nstep} to 0 in input. This is useful to have +a quick check of the correctness of the input. \subsection{Electronic structure calculations} \paragraph{Single-point (fixed-ion) SCF calculation} diff --git a/PW/src/run_pwscf.f90 b/PW/src/run_pwscf.f90 index 4a5cef7c5..42557853f 100644 --- a/PW/src/run_pwscf.f90 +++ b/PW/src/run_pwscf.f90 @@ -109,7 +109,7 @@ SUBROUTINE run_pwscf( exit_status ) ! ... dry run: code will stop here if called with exit file present ! ... useful for a quick and automated way to check input data ! - IF ( check_stop_now() ) THEN + IF ( nstep == 0 .OR. check_stop_now() ) THEN CALL pre_init() CALL data_structure( gamma_only ) CALL summary()