[QE-users] pwtk scripting
wenusaras
wenusaras at uom.lk
Mon May 15 14:27:40 CEST 2023
On 2023-05-15 14:54, Tone Kokalj wrote:
> On Mon, 2023-05-15 at 14:34 +0530, wenusaras wrote:
>> I am new to QE.
>> I am fallowing the MAX School workshop on QE.
>>
>> The command in the pwtk script
>> " # run the pw.x calculation
>> runPW $name.in
>> "
>> is running with a single processor. (is that true?)
>
> It depends: YES, if you did not define to run in parallel.
>
> To run in parallel you can do:
>
> prefix mpirun -np 4
> runPW $name.in
>
> or
>
> runPW -prefix {mpirun -np 4} $name.in
>
> But it is recommended to specify default "prefix" in ~/.pwtk/pwtk.tcl.
> The following snippet will auto detect the number of procs on your
> computer and use them for calculations:
>
> try {
> set np [exec nproc]
> while { [catch {exec mpirun -n $np echo yes}] && $np > 1 } {
> set np [expr { $np > 2 ? $np / 2 : 1 }]
> }
> if { $np > 1 } {
> prefix mpirun -n $np
> }
> }
>
> You can put this snippet in ~/.pwtk/pwtk.tcl
>
> Best regards,
> Tone
=====================
Thank you for your explanatory reply.
--
Thank You
Wenusara Satheekshana
More information about the users
mailing list