[Pw_forum] batch file

Lorenzo Paulatto Lorenzo.Paulatto at impmc.upmc.fr
Tue Oct 26 14:27:24 CEST 2010


On Tue, 26 Oct 2010 14:04:33 +0200, B. Koa <barfi.koa at gmail.com> wrote:

> Dear QE users
>
> Is there a way for running a batch of QE's input files by a command line?
> (It means when a job is completed, the next file should begin running.)
>


Dear Koa,
I assume you what to do a simple serial run, in a Linux or similar  
environment; if my guess is not correct, you should provide more details  
on your system.

In general what you are asking for is noting fancy at all, in general a  
batch file (known as "script" in unix) is just a sequence of operations to  
be executed one after the other.

In particular, if you create a text file called "pw_batch.sh" and write in  
it something like this:

#!/bin/bash
# beginning of the file "pw_batch.sh"
/wherever/it/is/pw.x -in file1.in > file1.out
/wherever/it/is/pw.x -in file2.in > file2.out
/wherever/it/is/pw.x -in file3.in > file3.out
# end of file

And the execute it with the command "sh pw_batch.sh" it will execute pw.x  
with the input1, then with input2 and finally with input3.

In general, this is a very basic unix questions, you should address  
similar questions to the technical support of your institution: they can  
surely provide you all the help you need.

best regards

-- 
Lorenzo Paulatto
post-doc @ IMPMC/UPMC - Université Paris 6
phone: +33 (0)1 44 27 74 89
www:   http://www-int.impmc.upmc.fr/~paulatto/

previously (take note of the change!):
phd student @ SISSA  &  DEMOCRITOS (Trieste)
phone: +39 040 3787 511
www:   http://people.sissa.it/~paulatto/



More information about the users mailing list