The Elk Code
Loading...
Searching...
No Matches
dyntask.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
subroutine
dyntask
(fnum,fext)
7
use
modmain
8
use
modphonon
9
use
modmpi
10
implicit none
11
! arguments
12
integer
,
intent(in)
:: fnum
13
character(*)
,
intent(out)
:: fext
14
! local variables
15
logical
exist
16
! only master process should search for file
17
if
(.not.
mp_mpi
)
goto
10
18
do
ipph
=1,3
19
do
isph
=1,
nspecies
20
do
iaph
=1,
natoms
(
isph
)
21
do
iqph
=1,
nqpt
22
! construct the dynamical matrix file extension
23
call
dynfext
(
iqph
,
isph
,
iaph
,
ipph
,fext)
24
! determine if the DYN file with this extension exists
25
inquire
(file=
'DYN'
//trim(fext),exist=exist)
26
if
(.not.exist)
then
27
open
(fnum,file=
'DYN'
//trim(fext),form=
'FORMATTED'
)
28
iasph
=
idxas
(
iaph
,
isph
)
29
goto
10
30
end if
31
end do
32
end do
33
end do
34
end do
35
iqph
=0;
isph
=0;
iaph
=0;
iasph
=0;
ipph
=0
36
write
(*,
'("Info(dyntask): nothing more to do")'
)
37
10
continue
38
! broadcast to all other MPI processes
39
call
mpi_bcast(
iqph
,1,mpi_integer,0,
mpicom
,
ierror
)
40
call
mpi_bcast(
isph
,1,mpi_integer,0,
mpicom
,
ierror
)
41
call
mpi_bcast(
iaph
,1,mpi_integer,0,
mpicom
,
ierror
)
42
call
mpi_bcast(
iasph
,1,mpi_integer,0,
mpicom
,
ierror
)
43
call
mpi_bcast(
ipph
,1,mpi_integer,0,
mpicom
,
ierror
)
44
if
(
iqph
== 0)
then
45
fext=
'.OUT'
46
else
47
call
dynfext
(
iqph
,
isph
,
iaph
,
ipph
,fext)
48
end if
49
! set the q = 0 flag
50
tphq0
=(
iqph
== 1)
51
end subroutine
52
dynfext
subroutine dynfext(iq, is, ia, ip, fext)
Definition
dynfext.f90:7
dyntask
subroutine dyntask(fnum, fext)
Definition
dyntask.f90:7
modmain
Definition
modmain.f90:6
modmain::natoms
integer, dimension(maxspecies) natoms
Definition
modmain.f90:36
modmain::idxas
integer, dimension(maxatoms, maxspecies) idxas
Definition
modmain.f90:42
modmain::nqpt
integer nqpt
Definition
modmain.f90:525
modmain::nspecies
integer nspecies
Definition
modmain.f90:34
modmpi
Definition
modmpi.f90:6
modmpi::ierror
integer ierror
Definition
modmpi.f90:19
modmpi::mpicom
integer mpicom
Definition
modmpi.f90:11
modmpi::mp_mpi
logical mp_mpi
Definition
modmpi.f90:17
modphonon
Definition
modphonon.f90:6
modphonon::iaph
integer iaph
Definition
modphonon.f90:15
modphonon::ipph
integer ipph
Definition
modphonon.f90:15
modphonon::tphq0
logical tphq0
Definition
modphonon.f90:17
modphonon::iqph
integer iqph
Definition
modphonon.f90:15
modphonon::iasph
integer iasph
Definition
modphonon.f90:15
modphonon::isph
integer isph
Definition
modphonon.f90:15
dyntask.f90
Generated by
1.9.8