How to set correct MPI processes number in abinit-7.10.5?  [SOLVED]

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
kinsang
Posts: 13
Joined: Wed Mar 23, 2016 2:24 pm

How to set correct MPI processes number in abinit-7.10.5?

Post by kinsang » Sun Mar 27, 2016 4:16 am

Hi, everyone.
I am a new user and build the abinit-7.10.5 MPI version.
I dont know how to set the correct MPI process number. Is it relevant to the parameters in input files?
For example, in the test case: abinit-7.10.5/tests/tutoparal/Input/tdfpt_03.files , why max nprocs=24
#SLAB ending TiO2 double layer
# N=9
# paralelectric configuration
#Supercell and atoms

acell 4.0 4.0 28.0 Angstrom
xcart 0.0000000000E+00 0.0000000000E+00 -4.2633349730E+00
3.7794522658E+00 3.7794522658E+00 -3.2803418097E+00
0.0000000000E+00 3.7794522658E+00 -3.6627278067E+00
3.7794522658E+00 0.0000000000E+00 6.5250113947E-01
0.0000000000E+00 3.7794522658E+00 -1.0555036964E-01
3.7794522658E+00 3.7794522658E+00 3.2682166278E-01
0.0000000000E+00 0.0000000000E+00 3.9815918094E+00
3.7794522658E+00 3.7794522658E+00 4.0167907030E+00
3.7794522658E+00 0.0000000000E+00 7.7541444349E+00
0.0000000000E+00 3.7794522658E+00 7.6664087705E+00
3.7794522658E+00 3.7794522658E+00 7.7182324796E+00
0.0000000000E+00 0.0000000000E+00 1.1412913350E+01
3.7794522658E+00 3.7794522658E+00 1.1416615533E+01
3.7794522658E+00 0.0000000000E+00 1.5117809063E+01
0.0000000000E+00 3.7794522658E+00 1.5117809063E+01
3.7794522658E+00 3.7794522658E+00 1.5117809063E+01
0.0000000000E+00 0.0000000000E+00 1.8822704777E+01
3.7794522658E+00 3.7794522658E+00 1.8819002593E+01
3.7794522658E+00 0.0000000000E+00 2.2481473692E+01
0.0000000000E+00 3.7794522658E+00 2.2569209355E+01
3.7794522658E+00 3.7794522658E+00 2.2517385647E+01
0.0000000000E+00 0.0000000000E+00 2.6254026317E+01
3.7794522658E+00 3.7794522658E+00 2.6218827423E+01
3.7794522658E+00 0.0000000000E+00 2.9583116986E+01
0.0000000000E+00 3.7794522658E+00 3.0341168496E+01
3.7794522658E+00 3.7794522658E+00 2.9908796464E+01
0.0000000000E+00 0.0000000000E+00 3.4498953099E+01
3.7794522658E+00 3.7794522658E+00 3.3515959935E+01
0.0000000000E+00 3.7794522658E+00 3.3898345933E+01

ntypat 3

znucl 56 22 8
typat 3 3 2 3 3 2 1 3 3 3 2 1 3 3 3 2 1 3 3 3 2 1 3 3 3 2 3 3 2
natom 29
nband 120

#electronic structure
ecut 15.0
nstep 50
ngkpt 4 4 1
kptopt 1
tolwfr 1.0d-22
iprcel 45

prtden 0

paral_kgb 1
fftalg 401 # Needed to preserve old behaviour
npkpt 4
npband 6
npfft 1

#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% test_chain = tdfpt_03.in, tdfpt_04.in
#%% [files]
#%% psp_files= 56ba.psp_mod, 22ti.psp_mod, 8o.psp_mod
#%% [paral_info]
#%% max_nprocs = 24
#%% nprocs_to_test = 24
#%% [NCPU_24]
#%% files_to_test = tdfpt_03_MPI24.out, tolnlines = 0, tolabs = 0.0, tolrel= 0.0
#%% post_commands =
#%% ww_cp tdfpt_03_MPI24o_WFK tdfpt_04_MPI24i_WFK;
#%% ww_mv tdfpt_03_MPI24o_WFK tdfpt_04_MPI24i_WFQ'
#%% [extra_info]
#%% keywords = NC
#%% description = BaTiO3 linear response calculation
#%%<END TEST_INFO>

temok
Posts: 39
Joined: Tue Jun 08, 2010 1:44 am

Re: How to set correct MPI processes number in abinit-7.10.5

Post by temok » Sun Mar 27, 2016 4:53 pm

Dear Kinsang,

I believe 'nprocs=24' is for testing purposes. You do not need to set 'nproc' in the input file but in the command line. As far as I know, you should just set the number of processors NP such that NP is a proper divisor of 'nkpt', the total number of k-points; see 'Number of computing cores to accomplish a task' in the second URL below).

Example:
1) Set your environment variables such that 'mpirun' and 'abinit' are in your PATH (or give their absolute paths in the command below) and set correctly LD_LIBRARY_PATH (see the URL below, or look it up in the internet; if you are using intel's they provide a script to to all this, it's called 'compilervars.sh' and 'mpivars.sh').
2) Then If you wish to run with 10 processors, you do

Code: Select all

mpirun  -np 10  -machinefile <machines_file>   < abinit  >&  foo.files  >&  foo.log

Here
<foo.files> is 'tdfpt_03.files' in your example,
< machines_file > is a file containing the hostnames of your computing nodes. You can get the hostname of your machines by typing 'hostname' on your terminal. Collect the names in a file <machines_file>, e.g.

Code: Select all

host01.example.com
host02.example.com

See:
https://www.open-mpi.org/faq/?category=running#simple-spmd-run
and overall, the ABINIT tutorials on parallelism,
http://www.abinit.org/doc/helpfiles/for-v7.10/tutorial/lesson_basepar.html

Cheers,
Temok

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: How to set correct MPI processes number in abinit-7.10.5  [SOLVED]

Post by Jordan » Tue Apr 05, 2016 9:43 am

Yes, all the lines at the end of the input files provided in the tests directory and starting with #%% are just comments that we use for our test farm.
Here, it means that the test case is tested on a maximum number of 24 cpus.

Cheers.

Locked