Re: [QE-users] using mpirun -np with pwtk script

2023-03-22 Thread marekgocnik via users
--==608408229321838746=MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

I added the prefix to the source file, worked like a charm.

Thank you, have a nice day


> ** Wed, 22 Mar 2023 14:01:00 +0100 - users@lists.quantum-espresso.org **
>
> On Wed, 2023-03-22 at 13:45 +0100, Matic wrote:
> > Hi,
> > 
> > you can add:
> > 
> > prefix "mpirun -np X"
> > 
> > to your pwtk script (where X is the number of processors); 
> > this can also be specified in your local ~/.pwtk/pwtk.tcl file so
> > that you don't have to add it to every script when running on a
> > particular machine
> 
> In addition, the specification can be made "automatic" by adding the
> following snippet to ~/.pwtk/pwtk.tcl
> 
> 
> # get the number of available processors
> set np [exec nproc]
> while { [catch {exec mpirun -n $np echo yes}] } {
> set np [expr { $np > 2 ? $np / 2 : 1 }]
> }
> prefix mpirun -n $np
> 
> 
> This will automatically determine the number of cores on your computer
> and use them for running QE executables.
> 
> Regards, Tone
> -- 
> Jožef Stefan Institute, Ljubljana, Slovenia
> 
> 
> 
> 
> ___
> The Quantum ESPRESSO community stands by the Ukrainian
> people and expresses its concerns about the devastating
> effects that the Russian military offensive has on their
> country and on the free and peaceful scientific, cultural,
> and economic cooperation amongst peoples
> ___
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
> users mailing list users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
--==608408229321838746=MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable


I added the prefix to the 
source file, worked like a charm.Thank you, have a nice 
day** Wed, 22 Mar 2023 14:01:00 +0100 - 
users@lists.quantum-espresso.org **
On Wed, 2023-03-22 at 13:45 +0100, Matic wrote: 
Hi,  you can add:  prefix "mpirun -np 
X"  to your pwtk script (where X is the number of 
processors);  this can also be specified in your local 
~/.pwtk/pwtk.tcl file so that you don't have to add it to every script 
when running on a particular machineIn addition, the 
specification can be made "automatic" by adding thefollowing snippet to 
~/.pwtk/pwtk.tcl# get the number of available 
processorsset np [exec nproc]while { [catch {exec mpirun -n 
$np echo yes}] } {set np [expr { $np  2 ? $np / 2 : 1 }]  
  }prefix mpirun -n $npThis will automatically 
determine the number of cores on your computerand use them for running QE 
executables.Regards, Tone-- Jožef Stefan Institute, 
Ljubljana, 
Slovenia___The
 Quantum ESPRESSO community stands by the Ukrainianpeople and expresses 
its concerns about the devastatingeffects that the Russian military 
offensive has on theircountry and on the free and peaceful scientific, 
cultural,and economic cooperation amongst 
peoples___Quantum 
ESPRESSO is supported by MaX (www.max-centre.eu)users mailing list 
users@lists.quantum-espresso.orghttps://lists.quantum-espresso.org/mailman/listinfo/users
--==608408229321838746==--
___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

Re: [QE-users] using mpirun -np with pwtk script

2023-03-22 Thread Tone Kokalj
On Wed, 2023-03-22 at 13:45 +0100, Matic wrote:
> Hi,
> 
> you can add:
> 
> prefix "mpirun -np X"
> 
> to your pwtk script (where X is the number of processors); 
> this can also be specified in your local ~/.pwtk/pwtk.tcl file so
> that you don't have to add it to every script when running on a
> particular machine

In addition, the specification can be made "automatic" by adding the
following snippet to ~/.pwtk/pwtk.tcl


# get the number of available processors
set np [exec nproc]
while { [catch {exec mpirun -n $np echo yes}] } {
set np [expr { $np > 2 ? $np / 2 : 1 }]
}
prefix mpirun -n $np


This will automatically determine the number of cores on your computer
and use them for running QE executables.

Regards, Tone
-- 
Jožef Stefan Institute, Ljubljana, Slovenia




___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

Re: [QE-users] using mpirun -np with pwtk script

2023-03-22 Thread Matic

Hi,

you can add:

prefix "mpirun -np X"

to your pwtk script (where X is the number of processors);
this can also be specified in your local ~/.pwtk/pwtk.tcl file so that 
you don't have to add it to every script when running on a particular 
machine


For more details see: 
http://pwtk.ijs.si/src/pwtk_tcl42E52E20Executables2F3A3Apwtk3A3Aprefix.html#robo195


Best,

Matic Poberznik


Hello everyone,

I would like to ask you, if it were possible to use mpirun -np for 
parallel computation, while using pwtk script to run my calculations. 
On pwtk webpage, it is stated that it should run in parallel mode, but 
only one of my cores is being used.


Can anyone point my in some direciton

Thank you in advance.

PS:I have also attached a script

# load the pw.x input from file
load_fromPWI pwscf.in

# open a file for writing resulting total energies
set fid [open etot_vs_ecutwfc.dat w]

# loop over different "ecut" values
foreach ecut { 45 50 55 60 65 70 75 80 85 90 95 100 } {

    # name of I/O files: $name.in & $name.out
    set name TiB2_alpha_scf_ecutwfc-$ecut

    # set the pw.x "ecutwfc" variable
    SYSTEM "ecutwfc = $ecut"

    # run the pw.x calculation
    runPW $name.in

    # extract the "total energy" and write it to file
    set Etot [::pwtk::pwo::totene $name.out]
    puts $fid "$ecut $Etot"
}

close $fid


___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing listus...@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users


--
Matic Poberznik
CNR-IOM Democritos c/o SISSA, via Bonomea 265, Trieste, Italy
___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

[QE-users] using mpirun -np with pwtk script

2023-03-22 Thread marekgocnik via users
--==d26340480031015718=MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hello everyone,  
  
I would like to ask you, if it were possible to use mpirun -np for
parallel computation, while using pwtk script to run my calculations. On
pwtk webpage, it is stated that it should run in parallel mode, but only
one of my cores is being used.

Can anyone point my in some direciton  
  
Thank you in advance.  
  
PS:I have also attached a script  
  
# load the pw.x input from file  
load_fromPWI pwscf.in  
  
# open a file for writing resulting total energies  
set fid [open etot_vs_ecutwfc.dat w]  
  
# loop over different "ecut" values  
foreach ecut { 45 50 55 60 65 70 75 80 85 90 95 100 } {  
  
    # name of I/O files: $name.in & $name.out  
    set name TiB2_alpha_scf_ecutwfc-$ecut  
  
    # set the pw.x "ecutwfc" variable  
    SYSTEM "ecutwfc = $ecut"  
  
    # run the pw.x calculation  
    runPW $name.in  
  
    # extract the "total energy" and write it to file  
    set Etot [::pwtk::pwo::totene $name.out]  
    puts $fid "$ecut $Etot"  
}  
  
close $fid
--==d26340480031015718=MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable


Hello 
everyone,I would like to ask you, if it were possible to use mpirun 
-np for parallel computation, while using pwtk script to run my calculations. 
On pwtk webpage, it is stated that it should run in parallel mode, but only one 
of my cores is being used.Can anyone point my in some 
direcitonThank you in advance.PS:I have also attached a 
script# load the pw.x input from fileload_fromPWI 
pwscf.in# open a file for writing resulting total energiesset 
fid [open etot_vs_ecutwfc.dat w]# loop over different "ecut" 
valuesforeach ecut { 45 50 55 60 65 70 75 80 85 90 95 100 } {  
  # name of I/O files: $name.in  $name.out    set name 
TiB2_alpha_scf_ecutwfc-$ecut    # set the pw.x "ecutwfc" 
variable    SYSTEM "ecutwfc = $ecut"    # run the pw.x 
calculation    runPW $name.in    # extract the "total 
energy" and write it to file    set Etot [::pwtk::pwo::totene 
$name.out]    puts $fid "$ecut $Etot"}close $fid 

--==d26340480031015718==--
___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users