Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
7fe131dc
Commit
7fe131dc
authored
Mar 24, 2017
by
Daniel Wortmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of fleur-git:fleur into develop
parents
8ad44b90
ea0757ed
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
261 additions
and
46 deletions
+261
-46
cdn/cdnval.F90
cdn/cdnval.F90
+4
-2
io/cdn_io.F90
io/cdn_io.F90
+199
-16
io/cdn_read.F
io/cdn_read.F
+0
-11
io/cdnpot_io_hdf.F90
io/cdnpot_io_hdf.F90
+57
-17
main/fleur_init.F90
main/fleur_init.F90
+1
-0
No files found.
cdn/cdnval.F90
View file @
7fe131dc
...
...
@@ -540,8 +540,10 @@ CONTAINS
noccbd
,
n_start
,
n_end
,&
lapw
%
nmat
,
lapw
%
nv
,
ello
,
evdu
,
epar
,
kveclo
,&
lapw
%
k1
,
lapw
%
k2
,
lapw
%
k3
,
bkpt
,
wk
,
nbands
,
eig
,
zMat
)
#ifdef CPP_MPI
! Sinchronizes the RMA operations
if
(
l_evp
)
CALL
MPI_BARRIER
(
mpi
%
mpi_comm
,
ie
)
#endif
!IF (l_evp.AND.(isize.GT.1)) THEN
! eig(1:noccbd) = eig(n_start:n_end)
!ENDIF
...
...
io/cdn_io.F90
View file @
7fe131dc
...
...
@@ -31,7 +31,7 @@ MODULE m_cdn_io
PUBLIC
readCoreDensity
,
writeCoreDensity
PUBLIC
readStars
,
writeStars
PUBLIC
readStepfunction
,
writeStepfunction
PUBLIC
setStartingDensity
,
readPrevEFermi
PUBLIC
setStartingDensity
,
readPrevEFermi
,
deleteDensities
PUBLIC
CDN_INPUT_DEN_const
,
CDN_OUTPUT_DEN_const
PUBLIC
CDN_ARCHIVE_TYPE_CDN1_const
,
CDN_ARCHIVE_TYPE_NOCO_const
PUBLIC
CDN_ARCHIVE_TYPE_CDN_const
...
...
@@ -62,11 +62,16 @@ MODULE m_cdn_io
INTEGER
::
readDensityIndex
,
lastDensityIndex
CHARACTER
(
LEN
=
30
)
::
archiveName
INTEGER
::
dateTemp
,
timeTemp
INTEGER
::
iterTemp
,
starsIndexTemp
,
latharmsIndexTemp
INTEGER
::
structureIndexTemp
,
stepfunctionIndexTemp
INTEGER
::
previousDensityIndex
,
jspinsTemp
REAL
::
fermiEnergyTemp
,
distanceTemp
LOGICAL
::
l_qfixTemp
CHARACTER
(
LEN
=
10
)
::
dateString
CHARACTER
(
LEN
=
10
)
::
timeString
CHARACTER
(
LEN
=
19
)
::
timeStampString
CHARACTER
(
LEN
=
15
)
::
distanceString
CALL
getMode
(
mode
)
...
...
@@ -80,7 +85,7 @@ MODULE m_cdn_io
IF
(
l_exist
)
THEN
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
currentStepfunctionIndex
,
readDensityIndex
,
lastDensityIndex
)
WRITE
(
*
,
*
)
'densityIndex iteration prevDensity prevDistance'
WRITE
(
*
,
*
)
'densityIndex iteration prevDensity prevDistance
timeStamp
'
DO
i
=
1
,
lastDensityIndex
archiveName
=
''
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
i
...
...
@@ -93,10 +98,22 @@ MODULE m_cdn_io
CALL
peekDensityEntryHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_UNDEFINED_const
,&
iterTemp
,
starsIndexTemp
,
latharmsIndexTemp
,
structureIndexTemp
,&
stepfunctionIndexTemp
,
previousDensityIndex
,
jspinsTemp
,&
distanceTemp
,
fermiEnergyTemp
,
l_qfixTemp
)
d
ateTemp
,
timeTemp
,
d
istanceTemp
,
fermiEnergyTemp
,
l_qfixTemp
)
WRITE
(
*
,
'(1x,i7,6x,i7,7x,i7,4x,f15.8)'
)
i
,
iterTemp
,
previousDensityIndex
,
distanceTemp
WRITE
(
dateString
,
'(i8)'
),
dateTemp
WRITE
(
timeString
,
'(i6)'
),
timeTemp
distanceString
=
''
IF
(
distanceTemp
.GE.
-1e-10
)
THEN
WRITE
(
distanceString
,
'(f15.8)'
)
distanceTemp
END
IF
WRITE
(
timeStampString
,
'(a4,a1,a2,a1,a2,1x,a2,a1,a2,a1,a2)'
)
&
dateString
(
1
:
4
),
'/'
,
dateString
(
5
:
6
),
'/'
,
dateString
(
7
:
8
),&
timeString
(
1
:
2
),
':'
,
timeString
(
3
:
4
),
':'
,
timeString
(
5
:
6
)
WRITE
(
*
,
'(1x,i7,6x,i7,7x,i7,4x,a15,3x,a)'
)
i
,
iterTemp
,
previousDensityIndex
,
distanceString
,&
TRIM
(
ADJUSTL
(
timeStampString
))
END
DO
CALL
closeCDNPOT_HDF
(
fileID
)
ELSE
...
...
@@ -198,7 +215,7 @@ MODULE m_cdn_io
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
currentStepfunctionIndex
,
readDensityIndex
,
lastDensityIndex
)
CALL
readDensityHDF
(
fileID
,
archiveName
,
densityType
,&
CALL
readDensityHDF
(
fileID
,
input
,
stars
,
sphhar
,
atoms
,
vacuum
,
oneD
,
archiveName
,
densityType
,&
fermiEnergy
,
l_qfix
,
iter
,
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
CALL
closeCDNPOT_HDF
(
fileID
)
...
...
@@ -321,13 +338,16 @@ MODULE m_cdn_io
TYPE
(
t_sphhar
)
::
sphharTemp
TYPE
(
t_input
)
::
inputTemp
TYPE
(
t_sym
)
::
symTemp
TYPE
(
t_cell
)
::
cellTemp
TYPE
(
t_oneD
)
::
oneDTemp
COMPLEX
,
ALLOCATABLE
::
fpwTemp
(:,:),
fzxyTemp
(:,:,:,:)
REAL
,
ALLOCATABLE
::
frTemp
(:,:,:,:),
fzTemp
(:,:,:)
INTEGER
::
mode
,
iterTemp
,
k
,
i
,
iVac
,
j
,
iUnit
INTEGER
::
d1
,
d10
,
asciioffset
,
iUnitTemp
LOGICAL
::
l_exist
,
l_storeIndices
LOGICAL
::
l_exist
,
l_storeIndices
,
l_writeNew
LOGICAL
::
l_writeAll
CHARACTER
(
len
=
30
)
::
filename
CHARACTER
(
len
=
5
)
::
cdnfile
...
...
@@ -341,11 +361,18 @@ MODULE m_cdn_io
INTEGER
::
starsIndexTemp
,
latharmsIndexTemp
,
structureIndexTemp
INTEGER
::
stepfunctionIndexTemp
INTEGER
::
jspinsTemp
INTEGER
::
date
,
time
,
dateTemp
,
timeTemp
REAL
::
fermiEnergyTemp
,
distanceTemp
LOGICAL
::
l_qfixTemp
CHARACTER
(
LEN
=
30
)
::
archiveName
CHARACTER
(
LEN
=
8
)
::
dateString
CHARACTER
(
LEN
=
10
)
::
timeString
CHARACTER
(
LEN
=
10
)
::
zone
CALL
getMode
(
mode
)
CALL
DATE_AND_TIME
(
dateString
,
timeString
,
zone
)
READ
(
dateString
,
'(i8)'
)
date
READ
(
timeString
,
'(i6)'
)
time
IF
(
mode
.EQ.
CDN_HDF5_MODE
)
THEN
#ifdef CPP_HDF
...
...
@@ -353,25 +380,90 @@ MODULE m_cdn_io
currentStepfunctionIndex
,
readDensityIndex
,
lastDensityIndex
)
l_storeIndices
=
.FALSE.
l_writeAll
=
.FALSE.
IF
(
currentStructureIndex
.EQ.
0
)
THEN
currentStructureIndex
=
1
l_storeIndices
=
.TRUE.
l_writeAll
=
.TRUE.
CALL
writeStructureHDF
(
fileID
,
input
,
atoms
,
cell
,
vacuum
,
oneD
,
currentStructureIndex
)
ELSE
CALL
readStructureHDF
(
fileID
,
inputTemp
,
atomsTemp
,
cellTemp
,
vacuumTemp
,
oneDTemp
,
currentStructureIndex
)
l_writeNew
=
.FALSE.
IF
(
atoms
%
ntype
.NE.
atomsTemp
%
ntype
)
l_writeNew
=
.TRUE.
IF
(
atoms
%
nat
.NE.
atomsTemp
%
nat
)
l_writeNew
=
.TRUE.
IF
(
atoms
%
lmaxd
.NE.
atomsTemp
%
lmaxd
)
l_writeNew
=
.TRUE.
IF
(
atoms
%
jmtd
.NE.
atomsTemp
%
jmtd
)
l_writeNew
=
.TRUE.
IF
(
vacuum
%
dvac
.NE.
vacuumTemp
%
dvac
)
l_writeNew
=
.TRUE.
IF
(
ANY
(
ABS
(
cell
%
amat
(:,:)
-
cellTemp
%
amat
(:,:))
.GT.
1e-10
))
l_writeNew
=
.TRUE.
IF
(
.NOT.
l_writeNew
)
THEN
IF
(
ANY
(
atoms
%
nz
(:)
.NE.
atomsTemp
%
nz
(:)))
l_writeNew
=
.TRUE.
IF
(
ANY
(
atoms
%
lmax
(:)
.NE.
atomsTemp
%
lmax
(:)))
l_writeNew
=
.TRUE.
END
IF
IF
(
.NOT.
l_writeNew
)
THEN
DO
i
=
1
,
atoms
%
nat
IF
(
ANY
(
ABS
(
atoms
%
pos
(:,
i
)
-
atomsTemp
%
pos
(:,
i
))
.GT.
1e-10
))
l_writeNew
=
.TRUE.
END
DO
END
IF
IF
(
l_writeNew
)
THEN
currentStructureIndex
=
currentStructureIndex
+
1
l_storeIndices
=
.TRUE.
l_writeAll
=
.TRUE.
CALL
writeStructureHDF
(
fileID
,
input
,
atoms
,
cell
,
vacuum
,
oneD
,
currentStructureIndex
)
END
IF
END
IF
IF
(
currentStarsIndex
.EQ.
0
)
THEN
currentStarsIndex
=
1
l_storeIndices
=
.TRUE.
CALL
writeStarsHDF
(
fileID
,
currentStarsIndex
,
stars
)
ELSE
CALL
readStarsHDF
(
fileID
,
currentStarsIndex
,
starsTemp
)
l_writeNew
=
.FALSE.
IF
(
ABS
(
stars
%
gmax
-
starsTemp
%
gmax
)
.GT.
1e-10
)
l_writeNew
=
.TRUE.
IF
(
stars
%
ng3
.NE.
starsTemp
%
ng3
)
l_writeNew
=
.TRUE.
IF
(
stars
%
ng2
.NE.
starsTemp
%
ng2
)
l_writeNew
=
.TRUE.
IF
(
stars
%
mx1
.NE.
starsTemp
%
mx1
)
l_writeNew
=
.TRUE.
IF
(
stars
%
mx2
.NE.
starsTemp
%
mx2
)
l_writeNew
=
.TRUE.
IF
(
stars
%
mx3
.NE.
starsTemp
%
mx3
)
l_writeNew
=
.TRUE.
IF
(
stars
%
kimax
.NE.
starsTemp
%
kimax
)
l_writeNew
=
.TRUE.
IF
(
stars
%
kimax2
.NE.
starsTemp
%
kimax2
)
l_writeNew
=
.TRUE.
IF
(
l_writeNew
.OR.
l_writeAll
)
THEN
currentStarsIndex
=
currentStarsIndex
+
1
l_storeIndices
=
.TRUE.
CALL
writeStarsHDF
(
fileID
,
currentStarsIndex
,
stars
)
END
IF
END
IF
IF
(
currentLatharmsIndex
.EQ.
0
)
THEN
currentLatharmsIndex
=
1
l_storeIndices
=
.TRUE.
CALL
writeLatharmsHDF
(
fileID
,
currentLatharmsIndex
,
sphhar
)
END
IF
IF
(
currentStructureIndex
.EQ.
0
)
THEN
currentStructureIndex
=
1
l_storeIndices
=
.TRUE.
CALL
writeStructureHDF
(
fileID
,
input
,
atoms
,
cell
,
vacuum
,
oneD
,
currentStructureIndex
)
ELSE
CALL
readLatharmsHDF
(
fileID
,
currentLatharmsIndex
,
sphharTemp
)
l_writeNew
=
.FALSE.
IF
(
sphhar
%
ntypsd
.NE.
sphharTemp
%
ntypsd
)
l_writeNew
=
.TRUE.
IF
(
sphhar
%
memd
.NE.
sphharTemp
%
memd
)
l_writeNew
=
.TRUE.
IF
(
sphhar
%
nlhd
.NE.
sphharTemp
%
nlhd
)
l_writeNew
=
.TRUE.
IF
(
l_writeNew
.OR.
l_writeAll
)
THEN
currentLatharmsIndex
=
currentLatharmsIndex
+
1
l_storeIndices
=
.TRUE.
CALL
writeLatharmsHDF
(
fileID
,
currentLatharmsIndex
,
sphhar
)
END
IF
END
IF
IF
(
currentStepfunctionIndex
.EQ.
0
)
THEN
currentStepfunctionIndex
=
1
l_storeIndices
=
.TRUE.
CALL
writeStepfunctionHDF
(
fileID
,
currentStepfunctionIndex
,
currentStarsIndex
,
stars
)
ELSE
CALL
readStepfunctionHDF
(
fileID
,
currentStepfunctionIndex
,
starsTemp
)
l_writeNew
=
.FALSE.
IF
(
stars
%
ng3
.NE.
starsTemp
%
ng3
)
l_writeNew
=
.TRUE.
IF
(
stars
%
mx1
.NE.
starsTemp
%
mx1
)
l_writeNew
=
.TRUE.
IF
(
stars
%
mx2
.NE.
starsTemp
%
mx2
)
l_writeNew
=
.TRUE.
IF
(
stars
%
mx3
.NE.
starsTemp
%
mx3
)
l_writeNew
=
.TRUE.
IF
(
l_writeNew
.OR.
l_writeAll
)
THEN
currentStepfunctionIndex
=
currentStepfunctionIndex
+
1
l_storeIndices
=
.TRUE.
CALL
writeStepfunctionHDF
(
fileID
,
currentStepfunctionIndex
,
currentStarsIndex
,
stars
)
END
IF
END
IF
previousDensityIndex
=
readDensityIndex
writeDensityIndex
=
readDensityIndex
...
...
@@ -414,7 +506,7 @@ MODULE m_cdn_io
CALL
peekDensityEntryHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_UNDEFINED_const
,&
iterTemp
,
starsIndexTemp
,
latharmsIndexTemp
,
structureIndexTemp
,&
stepfunctionIndexTemp
,
previousDensityIndex
,
jspinsTemp
,&
distanceTemp
,
fermiEnergyTemp
,
l_qfixTemp
)
d
ateTemp
,
timeTemp
,
d
istanceTemp
,
fermiEnergyTemp
,
l_qfixTemp
)
END
IF
END
IF
...
...
@@ -433,7 +525,7 @@ MODULE m_cdn_io
CALL
writeDensityHDF
(
input
,
fileID
,
archiveName
,
densityType
,
previousDensityIndex
,&
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
currentStepfunctionIndex
,
distance
,
fermiEnergy
,
l_qfix
,
iter
+
relCdnIndex
,&
currentStepfunctionIndex
,
d
ate
,
time
,
d
istance
,
fermiEnergy
,
l_qfix
,
iter
+
relCdnIndex
,&
fr
,
fpw
,
fzTemp
,
fzxyTemp
,
cdom
,
cdomvz
,
cdomvxy
)
DEALLOCATE
(
fzTemp
,
fzxyTemp
)
...
...
@@ -598,7 +690,7 @@ MODULE m_cdn_io
INTEGER
::
starsIndex
,
latharmsIndex
,
structureIndex
INTEGER
::
stepfunctionIndex
INTEGER
::
iter
,
jspins
,
previousDensityIndex
INTEGER
::
date
,
time
,
iter
,
jspins
,
previousDensityIndex
REAL
::
fermiEnergy
,
distance
LOGICAL
::
l_qfix
,
l_exist
CHARACTER
(
LEN
=
30
)
::
archiveName
...
...
@@ -614,14 +706,14 @@ MODULE m_cdn_io
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
readDensityIndex
CALL
peekDensityEntryHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_UNDEFINED_const
,&
iter
,
starsIndex
,
latharmsIndex
,
structureIndex
,
stepfunctionIndex
,&
previousDensityIndex
,
jspins
,
distance
,
fermiEnergy
,
l_qfix
)
previousDensityIndex
,
jspins
,
d
ate
,
time
,
d
istance
,
fermiEnergy
,
l_qfix
)
archiveName
=
''
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
previousDensityIndex
l_exist
=
isDensityEntryPresentHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_NOCO_OUT_const
)
IF
(
l_exist
)
THEN
CALL
peekDensityEntryHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_NOCO_OUT_const
,&
iter
,
starsIndex
,
latharmsIndex
,
structureIndex
,
stepfunctionIndex
,&
previousDensityIndex
,
jspins
,
distance
,
fermiEnergy
,
l_qfix
)
previousDensityIndex
,
jspins
,
d
ate
,
time
,
d
istance
,
fermiEnergy
,
l_qfix
)
eFermiPrev
=
fermiEnergy
ELSE
l_error
=
.TRUE.
...
...
@@ -1109,6 +1201,97 @@ MODULE m_cdn_io
END
SUBROUTINE
setStartingDensity
SUBROUTINE
deleteDensities
()
#ifdef CPP_HDF
INTEGER
(
HID_T
)
::
fileID
#endif
INTEGER
::
currentStarsIndex
,
currentLatharmsIndex
INTEGER
::
currentStructureIndex
,
currentStepfunctionIndex
INTEGER
::
readDensityIndex
,
lastDensityIndex
INTEGER
::
ioStatus
,
mode
,
i
INTEGER
::
startNumber
,
endNumber
,
separatorIndex
CHARACTER
(
LEN
=
20
)
::
ddString
CHARACTER
(
LEN
=
30
)
::
archiveName
LOGICAL
::
l_exist
,
l_deleted
IF
(
.NOT.
juDFT_was_argument
(
"-delden"
))
THEN
RETURN
END
IF
ddString
=
juDFT_string_for_argument
(
"-delden"
)
IF
(
TRIM
(
ADJUSTL
(
ddString
))
.EQ.
''
)
THEN
CALL
juDFT_error
(
"Densities to be deleted not specified."
,
calledby
=
"deleteDensities"
)
END
IF
separatorIndex
=
-1
startNumber
=
-1
endNumber
=
-1
DO
i
=
1
,
LEN
(
TRIM
(
ADJUSTL
(
ddString
)))
IF
(
VERIFY
(
ddString
(
i
:
i
),
'1234567890'
)
.NE.
0
)
THEN
IF
((
ddString
(
i
:
i
)
.EQ.
'-'
)
.AND.
(
separatorIndex
.EQ.
-1
))
THEN
separatorIndex
=
i
ELSE
CALL
juDFT_error
(
"density deletion string format error"
,
calledby
=
"deleteDensities"
)
END
IF
END
IF
END
DO
IF
(
separatorIndex
.NE.
-1
)
THEN
READ
(
ddString
(
1
:
separatorIndex
-1
),
'(i)'
)
startNumber
READ
(
ddString
(
separatorIndex
+1
:
LEN
(
TRIM
(
ADJUSTL
(
ddString
)))),
'(i)'
)
endNumber
ELSE
READ
(
ddString
(
1
:
LEN
(
TRIM
(
ADJUSTL
(
ddString
)))),
'(i)'
)
startNumber
READ
(
ddString
(
1
:
LEN
(
TRIM
(
ADJUSTL
(
ddString
)))),
'(i)'
)
endNumber
END
IF
CALL
getMode
(
mode
)
IF
(
mode
.EQ.
CDN_HDF5_MODE
)
THEN
INQUIRE
(
FILE
=
'cdn.hdf'
,
EXIST
=
l_exist
)
IF
(
l_exist
)
THEN
#ifdef CPP_HDF
CALL
openCDN_HDF
(
fileID
,
currentStarsIndex
,
currentLatharmsIndex
,
currentStructureIndex
,&
currentStepfunctionIndex
,
readDensityIndex
,
lastDensityIndex
)
DO
i
=
startNumber
,
endNumber
archiveName
=
''
WRITE
(
archiveName
,
'(a,i0)'
)
'/cdn-'
,
i
l_exist
=
isDensityEntryPresentHDF
(
fileID
,
archiveName
,
DENSITY_TYPE_UNDEFINED_const
)
IF
(
.NOT.
l_exist
)
THEN
CYCLE
END
IF
l_deleted
=
deleteDensityEntryHDF
(
fileID
,
archiveName
)
IF
(
l_deleted
)
THEN
WRITE
(
*
,
*
)
'deleted density entry '
,
TRIM
(
ADJUSTL
(
archiveName
))
END
IF
END
DO
CALL
closeCDNPOT_HDF
(
fileID
)
#endif
WRITE
(
*
,
*
)
'Please note:'
WRITE
(
*
,
*
)
'The deletion of the densities does not free the associated disk space.'
WRITE
(
*
,
*
)
'To do this you have to repack the cdn.hdf file.'
WRITE
(
*
,
*
)
'It can be done by using the tool h5repack, e.g., by invoking'
WRITE
(
*
,
*
)
'h5repack -i cdn.hdf -o cdn-packed.hdf'
WRITE
(
*
,
*
)
'mv cdn-packed.hdf cdn.hdf'
ELSE
WRITE
(
*
,
*
)
"No cdn.hdf file found. No density entry deleted."
END
IF
ELSE
IF
(
mode
.EQ.
CDN_STREAM_MODE
)
THEN
STOP
'CDN_STREAM_MODE not yet implemented!'
ELSE
WRITE
(
*
,
*
)
'Explicit deletion of densities in direct access mode'
WRITE
(
*
,
*
)
'not implemented.'
WRITE
(
*
,
*
)
''
WRITE
(
*
,
*
)
'Ignoring -dd command line argument.'
END
IF
CALL
juDFT_error
(
"Densities deleted."
)
END
SUBROUTINE
deleteDensities
SUBROUTINE
getMode
(
mode
)
INTEGER
,
INTENT
(
OUT
)
::
mode
...
...
io/cdn_read.F
View file @
7fe131dc
...
...
@@ -158,17 +158,6 @@ c
< zmat=zmat)
ENDIF
#ifdef CPP_MPI
! The barrier here is not algorithmically required.
! Nevertheless it improves the performance, presumably because it
! synchronizes the processes and prevent the latency accumulating.
! U.Alekseeva 2015
!Note: this does not work, two problems:
! a) MPI_COMM_WORLD should not be used
! b) Not all processes might reach this point due to k-point parallelization
! call MPI_BARRIER(MPI_COMM_WORLD,mpiierr)
#endif
CALL timestop("cdn_read")
! IF (nbands>neigd) CALL juDFT_error("nbands.GT.neigd",calledby
...
...
io/cdnpot_io_hdf.F90
View file @
7fe131dc
...
...
@@ -25,7 +25,7 @@ MODULE m_cdnpot_io_hdf
PUBLIC
writePotentialHDF
,
readPotentialHDF
PUBLIC
writeCoreDensityHDF
,
readCoreDensityHDF
PUBLIC
writeCDNHeaderData
,
writePOTHeaderData
PUBLIC
isCoreDensityPresentHDF
PUBLIC
isCoreDensityPresentHDF
,
deleteDensityEntryHDF
PUBLIC
isDensityEntryPresentHDF
,
isPotentialEntryPresentHDF
PUBLIC
peekDensityEntryHDF
#endif
...
...
@@ -1196,7 +1196,7 @@ MODULE m_cdnpot_io_hdf
CALL
h5dclose_f
(
neqSetID
,
hdfError
)
dimsInt
(:
1
)
=
(/
atoms
%
ntype
/)
CALL
h5dopen_f
(
groupID
,
'jri'
,
nz
SetID
,
hdfError
)
CALL
h5dopen_f
(
groupID
,
'jri'
,
jri
SetID
,
hdfError
)
CALL
io_read_integer1
(
jriSetID
,(/
1
/),
dimsInt
(:
1
),
atoms
%
jri
)
CALL
h5dclose_f
(
jriSetID
,
hdfError
)
...
...
@@ -1266,7 +1266,8 @@ MODULE m_cdnpot_io_hdf
SUBROUTINE
writeDensityHDF
(
input
,
fileID
,
archiveName
,
densityType
,
previousDensityIndex
,&
starsIndex
,
latharmsIndex
,
structureIndex
,
stepfunctionIndex
,&
distance
,
fermiEnergy
,
l_qfix
,
iter
,
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
date
,
time
,
distance
,
fermiEnergy
,
l_qfix
,
iter
,&
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
...
...
@@ -1275,7 +1276,7 @@ MODULE m_cdnpot_io_hdf
INTEGER
,
INTENT
(
IN
)
::
stepfunctionIndex
CHARACTER
(
LEN
=*
),
INTENT
(
IN
)
::
archiveName
INTEGER
,
INTENT
(
IN
)
::
iter
INTEGER
,
INTENT
(
IN
)
::
date
,
time
,
iter
REAL
,
INTENT
(
IN
)
::
fermiEnergy
,
distance
LOGICAL
,
INTENT
(
IN
)
::
l_qfix
...
...
@@ -1507,6 +1508,8 @@ MODULE m_cdnpot_io_hdf
CALL
io_write_attint0
(
archiveID
,
'stepfunctionIndex'
,
stepfunctionIndex
)
CALL
io_write_attint0
(
archiveID
,
'spins'
,
input
%
jspins
)
CALL
io_write_attint0
(
archiveID
,
'iter'
,
iter
)
CALL
io_write_attint0
(
archiveID
,
'date'
,
date
)
CALL
io_write_attint0
(
archiveID
,
'time'
,
time
)
CALL
io_write_attreal0
(
archiveID
,
'distance'
,
distance
)
CALL
h5gcreate_f
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)),
groupID
,
hdfError
)
...
...
@@ -1798,9 +1801,17 @@ MODULE m_cdnpot_io_hdf
END
SUBROUTINE
writePotentialHDF
SUBROUTINE
readDensityHDF
(
fileID
,
archiveName
,
densityType
,&
SUBROUTINE
readDensityHDF
(
fileID
,
input
,
stars
,
latharms
,
atoms
,
vacuum
,
oneD
,&
archiveName
,
densityType
,&
fermiEnergy
,
l_qfix
,
iter
,
fr
,
fpw
,
fz
,
fzxy
,
cdom
,
cdomvz
,
cdomvxy
)
TYPE
(
t_input
),
INTENT
(
IN
)
::
input
TYPE
(
t_stars
),
INTENT
(
IN
)
::
stars
TYPE
(
t_sphhar
),
INTENT
(
IN
)
::
latharms
TYPE
(
t_atoms
),
INTENT
(
IN
)
::
atoms
TYPE
(
t_vacuum
),
INTENT
(
IN
)
::
vacuum
TYPE
(
t_oneD
),
INTENT
(
IN
)
::
oneD
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
INTEGER
,
INTENT
(
IN
)
::
densityType
CHARACTER
(
LEN
=*
),
INTENT
(
IN
)
::
archiveName
...
...
@@ -1927,23 +1938,27 @@ MODULE m_cdnpot_io_hdf
CALL
io_read_attreal0
(
groupID
,
'fermiEnergy'
,
fermiEnergy
)
CALL
io_read_attlog0
(
groupID
,
'l_qfix'
,
l_qfix
)
dimsInt
(:
4
)
=
(/
jmtd
,
nlhd
+1
,
ntype
,
jspins
/)
fr
=
0.0
dimsInt
(:
4
)
=
(/
MIN
(
jmtd
,
atoms
%
jmtd
),
MIN
(
nlhd
,
latharms
%
nlhd
)
+1
,
MIN
(
ntype
,
atoms
%
ntype
),
MIN
(
jspins
,
input
%
jspins
)/)
CALL
h5dopen_f
(
groupID
,
'fr'
,
frSetID
,
hdfError
)
CALL
io_read_real4
(
frSetID
,(/
1
,
1
,
1
,
1
/),
dimsInt
(:
4
),
fr
)
CALL
h5dclose_f
(
frSetID
,
hdfError
)
dimsInt
(:
3
)
=
(/
2
,
ng3
,
jspins
/)
fpw
=
CMPLX
(
0.0
,
0.0
)
dimsInt
(:
3
)
=
(/
2
,
MIN
(
ng3
,
stars
%
ng3
),
MIN
(
jspins
,
input
%
jspins
)/)
CALL
h5dopen_f
(
groupID
,
'fpw'
,
fpwSetID
,
hdfError
)
CALL
io_read_complex2
(
fpwSetID
,(/
-1
,
1
,
1
/),
dimsInt
(:
3
),
fpw
)
CALL
h5dclose_f
(
fpwSetID
,
hdfError
)
IF
(
l_film
)
THEN
dimsInt
(:
3
)
=
(/
nmzd
,
2
,
jspins
/)
fz
=
0.0
dimsInt
(:
3
)
=
(/
MIN
(
nmzd
,
vacuum
%
nmzd
),
2
,
MIN
(
jspins
,
input
%
jspins
)/)
CALL
h5dopen_f
(
groupID
,
'fz'
,
fzSetID
,
hdfError
)
CALL
io_read_real3
(
fzSetID
,(/
1
,
1
,
1
/),
dimsInt
(:
3
),
fz
)
CALL
h5dclose_f
(
fzSetID
,
hdfError
)
dimsInt
(:
5
)
=
(/
2
,
nmzxyd
,
ng2
-1
,
2
,
jspins
/)
fzxy
=
CMPLX
(
0.0
,
0.0
)
dimsInt
(:
5
)
=
(/
2
,
MIN
(
nmzxyd
,
vacuum
%
nmzxyd
),
MIN
(
ng2
,
stars
%
ng2
)
-1
,
2
,
MIN
(
jspins
,
input
%
jspins
)/)
CALL
h5dopen_f
(
groupID
,
'fzxy'
,
fzxySetID
,
hdfError
)
CALL
io_read_complex4
(
fzxySetID
,(/
-1
,
1
,
1
,
1
,
1
/),
dimsInt
(:
5
),
fzxy
)
CALL
h5dclose_f
(
fzxySetID
,
hdfError
)
...
...
@@ -1952,18 +1967,21 @@ MODULE m_cdnpot_io_hdf
IF
((
localDensityType
.EQ.
DENSITY_TYPE_NOCO_IN_const
)
.OR.
&
(
localDensityType
.EQ.
DENSITY_TYPE_NOCO_OUT_const
))
THEN
dimsInt
(:
2
)
=
(/
2
,
ng3
/)
cdom
=
CMPLX
(
0.0
,
0.0
)
dimsInt
(:
2
)
=
(/
2
,
MIN
(
ng3
,
stars
%
ng3
)/)
CALL
h5dopen_f
(
groupID
,
'cdom'
,
cdomSetID
,
hdfError
)
CALL
io_read_complex1
(
cdomSetID
,(/
-1
,
1
/),
dimsInt
(:
2
),
cdom
)
CALL
h5dclose_f
(
cdomSetID
,
hdfError
)
IF
(
l_film
)
THEN
dimsInt
(:
3
)
=
(/
2
,
nmz
,
nvac
/)
cdomvz
=
CMPLX
(
0.0
,
0.0
)
dimsInt
(:
3
)
=
(/
2
,
MIN
(
nmz
,
vacuum
%
nmz
),
MIN
(
nvac
,
vacuum
%
nvac
)/)
CALL
h5dopen_f
(
groupID
,
'cdomvz'
,
cdomvzSetID
,
hdfError
)
CALL
io_read_complex2
(
cdomvzSetID
,(/
-1
,
1
,
1
/),
dimsInt
(:
3
),
cdomvz
)
CALL
h5dclose_f
(
cdomvzSetID
,
hdfError
)
dimsInt
(:
4
)
=
(/
2
,
nmzxy
,
od_nq2
-1
,
nvac
/)
cdomvxy
=
CMPLX
(
0.0
,
0.0
)
dimsInt
(:
4
)
=
(/
2
,
MIN
(
nmzxy
,
vacuum
%
nmzxy
),
MIN
(
od_nq2
,
oneD
%
odi
%
nq2
)
-1
,
MIN
(
nvac
,
vacuum
%
nvac
)/)
CALL
h5dopen_f
(
groupID
,
'cdomvxy'
,
cdomvxySetID
,
hdfError
)
CALL
io_read_complex3
(
cdomvxySetID
,(/
-1
,
1
,
1
,
1
/),
dimsInt
(:
4
),
cdomvxy
)
CALL
h5dclose_f
(
cdomvxySetID
,
hdfError
)
...
...
@@ -2102,13 +2120,13 @@ MODULE m_cdnpot_io_hdf
SUBROUTINE
peekDensityEntryHDF
(
fileID
,
archiveName
,
densityType
,&
iter
,
starsIndex
,
latharmsIndex
,
structureIndex
,&
stepfunctionIndex
,
previousDensityIndex
,
jspins
,&
distance
,
fermiEnergy
,
l_qfix
)
d
ate
,
time
,
d
istance
,
fermiEnergy
,
l_qfix
)
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
INTEGER
,
INTENT
(
IN
)
::
densityType
CHARACTER
(
LEN
=*
),
INTENT
(
IN
)
::
archiveName
INTEGER
,
INTENT
(
OUT
)
::
iter
INTEGER
,
INTENT
(
OUT
)
::
date
,
time
,
iter
INTEGER
,
INTENT
(
OUT
)
::
starsIndex
,
latharmsIndex
,
structureIndex
,
stepfunctionIndex
INTEGER
,
INTENT
(
OUT
)
::
previousDensityIndex
,
jspins
REAL
,
INTENT
(
OUT
)
::
fermiEnergy
,
distance
...
...
@@ -2122,7 +2140,7 @@ MODULE m_cdnpot_io_hdf
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)))
IF
(
.NOT.
l_exist
)
THEN
CALL
juDFT_error
(
'density archive '
//
TRIM
(
ADJUSTL
(
archiveName
))//
' does not exist.'
,
calledby
=
"peekDensityHDF"
)
CALL
juDFT_error
(
'density archive '
//
TRIM
(
ADJUSTL
(
archiveName
))//
' does not exist.'
,
calledby
=
"peekDensity
Entry
HDF"
)
END
IF
localDensityType
=
densityType
...
...
@@ -2152,13 +2170,13 @@ MODULE m_cdnpot_io_hdf
CASE
(
DENSITY_TYPE_PRECOND_const
)
densityTypeName
=
'/precond'
CASE
DEFAULT
CALL
juDFT_error
(
"Unknown density type selected"
,
calledby
=
"peekDensityHDF"
)
CALL
juDFT_error
(
"Unknown density type selected"
,
calledby
=
"peekDensity
Entry
HDF"
)
END
SELECT
groupName
=
TRIM
(
ADJUSTL
(
archiveName
))//
TRIM
(
ADJUSTL
(
densityTypeName
))
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
groupName
)))
IF
(
.NOT.
l_exist
)
THEN
CALL
juDFT_error
(
'density entry '
//
TRIM
(
ADJUSTL
(
groupName
))//
' does not exist.'
,
calledby
=
"peekDensityHDF"
)
CALL
juDFT_error
(
'density entry '
//
TRIM
(
ADJUSTL
(
groupName
))//
' does not exist.'
,
calledby
=
"peekDensity
Entry
HDF"
)
END
IF
CALL
h5gopen_f
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)),
archiveID
,
hdfError
)
...
...
@@ -2171,6 +2189,8 @@ MODULE m_cdnpot_io_hdf
CALL
io_read_attint0
(
archiveID
,
'stepfunctionIndex'
,
stepfunctionIndex
)
CALL
io_read_attint0
(
archiveID
,
'spins'
,
jspins
)
CALL
io_read_attint0
(
archiveID
,
'iter'
,
iter
)
CALL
io_read_attint0
(
archiveID
,
'date'
,
date
)
CALL
io_read_attint0
(
archiveID
,
'time'
,
time
)
CALL
io_read_attreal0
(
archiveID
,
'distance'
,
distance
)
IF
(
densityType
.NE.
DENSITY_TYPE_UNDEFINED_const
)
THEN
...
...
@@ -2313,6 +2333,26 @@ MODULE m_cdnpot_io_hdf
END
SUBROUTINE
readCoreDensityHDF
LOGICAL
FUNCTION
deleteDensityEntryHDF
(
fileID
,
archiveName
)
INTEGER
(
HID_T
),
INTENT
(
IN
)
::
fileID
CHARACTER
(
LEN
=*
),
INTENT
(
IN
)
::
archiveName
INTEGER
::
hdfError
LOGICAL
::
l_exist
l_exist
=
io_groupexists
(
fileID
,
TRIM
(
ADJUSTL
(
archiveName
)))
IF
(
.NOT.
l_exist
)
THEN
deleteDensityEntryHDF
=
.FALSE.
RETURN
END
IF
CALL
h5ldelete_f
(
fileID
,
archiveName
,
hdfError
)
deleteDensityEntryHDF
=
.TRUE.
END
FUNCTION
deleteDensityEntryHDF
LOGICAL
FUNCTION
isCoreDensityPresentHDF
()
INTEGER
(
HID_T
)
::
fileID
...
...
main/fleur_init.F90
View file @
7fe131dc
...
...
@@ -503,6 +503,7 @@
IF
(
mpi
%
irank
.EQ.
0
)
THEN
CALL
fleur_info
(
kpts
)
CALL
deleteDensities
()
END
IF
!Finalize the MPI setup
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment