Commit ea0757ed authored by ua741532's avatar ua741532

Merge branch 'develop' of ifflinux.iff.kfa-juelich.de:fleur into develop

parents 45c1a185 2c92feac
Welcome to the source code of FLEUR
Outline:
1. Short Overview of the code
2. Installation
----------------------------------------------
1. Overview of the code
----------------------------------------------
The source of FLEUR is organized in several
subdirectories. Some of them collect code
specific for particular features, others code
relevant for crutial steps in the code or simply
code that is usually executed together.
Here a short description of the directories:
main: contains the main-program and several core subroutines
init: stuff for the initialization (called from fleur_init in main)
vgen: potential generation (called from vgen in main)
eigen: setup of the eigenproblem
diagonalization: various methods to diagonalize the Hamiltonian
cdn: general code for the generation of charge
cdn_mt: charge generation in MT-spheres
force: code related to the evaluation of forces
mix: charge/potential mixing routines
ldau: routines needed in case of LDA+U calculations
inpgen: code for the input generator (seperate executable inpgen)
fermi: determination of the fermi-level
eigen_secvar: second variational solution of the Hamiltonian
eigen_soc: Spin-orbit related code
core: Core states
dos: Code for Density of states, bandstructures
orbdep: Code for quantities depending on orbitals
optional: code that is used in special cases like inital charge generation
wannier: wannier related code
xc-pot: various exchange-correlation potential routines
mpi: code for parallel execution
io: subroutines doing IO
juDFT: timing, error handling, etc
math: code providing math functionality
include: c-type include files
global: code used everywhere (here you find types.F90 with the data-types)
cmake: definitions used by cmake (see Installation)
If you modify FLEUR please do so in the develop branch by running
git checkout -t origin/develop
after cloning the git repository.
----------------------------------------------
2. Installation
----------------------------------------------
For the compilation of FLEUR you will need:
- Fortran compiler (should support Fortran2008)
- Compatible C compiler for the XML-IO
- cmake for controlling the make-process
- Libraries:
* LAPACK/BLAS
* MPI for parallelization
* SCALAPACK or ELPA or ELEMENTAL if you want to use parallel diagonalization
(without you can only exploit k-point parallelism)
* HDF5 for parallel IO (if you have lots of memory, you might not need to do IO :-)
FLEUR now comes with a configuration script. This skript will
create a build sub-directory in the main FLEUR directory (where this file resides) and
then use cmake to generate a makefile. You should use it like
./configure.sh CONFIGURATION
where CONFIGURATION refers to a predefined maschine setup. Call ./configure.sh without any
argument for more information.
After the configure.sh script finishes, you should do
cd build
make
This might generate the FLEUR executables. It most probable will only work on systems we know as
only for those there will be specific configurations available.
Please see the webpages at www.flapw.de for documentation.
Welcome to the source code of FLEUR
===================================
Please note that the documentation of the
code can be found at the [FLEUR Homepage]
(http://www.flapw.de/pm/index.php?n=User-Documentation.Documentation).
For further instructions on Installation/Usage,
please check the [FLEUR Homepage]
(http://www.flapw.de/pm/index.php?n=User-Documentation.Documentation).
The rest of this document summarizes only the
structure of the FLEUR source code. Did
we mention to check the Homepage?
The source of FLEUR is organized in several
subdirectories. Some of them collect code
specific for particular features, others code
relevant for crutial steps in the code or simply
code that is usually executed together.
Here a short description of the directories:
* main: contains the main-program and several core subroutines
* init: stuff for the initialization (called from fleur_init in main)
* vgen: potential generation (called from vgen in main)
* eigen: setup of the eigenproblem
* diagonalization: various methods to diagonalize the Hamiltonian
* cdn: general code for the generation of charge
* cdn_mt: charge generation in MT-spheres
* force: code related to the evaluation of forces
* mix: charge/potential mixing routines
* ldau: routines needed in case of LDA+U calculations
* inpgen: code for the input generator (seperate executable inpgen)
* fermi: determination of the fermi-level
* eigen_secvar: second variational solution of the Hamiltonian
* eigen_soc: Spin-orbit related code
* core: Core states
* dos: Code for Density of states, bandstructures
* orbdep: Code for quantities depending on orbitals
* optional: code that is used in special cases like inital charge generation
* wannier: wannier related code
* xc-pot: various exchange-correlation potential routines
* mpi: code for parallel execution
* io: subroutines doing IO
* juDFT: timing, error handling, etc
* math: code providing math functionality
* include: c-type include files
* global: code used everywhere (here you find types.F90 with the data-types)
* cmake: definitions used by cmake
If you modify FLEUR please do so in the develop branch by running
'git checkout -t origin/develop'
after cloning the git repository. For larger changes you might want to
create your own branch.
List of BUGS/ things not tested or implemented:
-omp bug in vmtxc oder xcall
-Wannier part
-Hybrid functionals
-one-dimensional code
#!/usr/bin/env bash
#This skript is used by buildbot to set up the environment on different machines
# is loads modules and sets environment variables by sourcing the corresponding
# files in the machines directory and then calls the configuration script with
# the correct machine name
# the environment variable BUILDSLAVE_MACHINE must be set correctly for this to work
DIR="`dirname \"$0\"`"
m=$BUILDSLAVE_MACHINE
export FLEUR_CONFIG_MACHINE=$m
if [[ $m =~ "JURECA-GPU" ]]
then
source $DIR/machines/JURECA/pgisource.sh
export FLEUR_CONFIG_MACHINE=JURECA
elif [[ $m =~ "JURECA-GCC" ]]
then
source $DIR/machines/JURECA/gccsource.sh
export FLEUR_CONFIG_MACHINE=AUTO
elif [[ $m =~ "JURECA" ]]
then
source $DIR/machines/JURECA/intelsource.sh
export FLEUR_CONFIG_MACHINE=JURECA
elif [[ $m =~ "JUQUEEN" ]]
then
source $DIR/machines/JUQUEEN/xlfsource.sh
export FLEUR_CONFIG_MACHINE=JUQUEEN
fi
$*
......@@ -7,13 +7,12 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -qopenmp")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O4")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit ")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
message("PGI Fortran detected")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda:kepler+ -ta:tesla:cuda7.5 -DUSE_STREAMS -DNUM_STREAMS=${N_STREAMS} -Minfo=accel -acc")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fast -O3")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -Mchkstk -Mchkptr")
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} "-lstdc++;-L$ENV{MKLROOT}/lib/intel64;-lmkl_scalapack_lp64;-lmkl_intel_lp64;-lmkl_pgi_thread;-lmkl_core;-lmkl_blacs_intelmpi_lp64")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "XL")
message("IBM/BG Fortran detected")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp=omp -qnosave -qarch=qp -qtune=qp -qrealsize=8 -qfixed -qsuppress=1520-022 -qessl")
......@@ -26,5 +25,5 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message("gfortran detected")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -fopenmp -fdefault-real-8 ")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O4")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -g")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fdump-core -Wall -Wextra -Warray-temporaries -fbacktrace -fcheck=all -finit-real=nan -O0 -g")
endif()
## This file can help you fixing compilation problems
## You should modify it and put it into the working-directory
## in which you call the configuration scipt
## Note: the full file is a comment currently, lines starting with
## single # should be modified. Remove the # afterwards.
## Set the compiler names, often cmake is good at finding the C-compiler
## but not the fortran compiler you what to use
#set(CMAKE_Fortran_COMPILER mpiifort)
#set(CMAKE_C_COMPILER mpiicc)
## Set options for the FORTRAN compiler:
## You at least will need something like -r8 to promote real variables to double
## precision. You can check cmake/compilerflags to see what is used for known compilers
## Add also include pathes here. This might be nescessary for libraries with a F90 interface
## such as ELPA,HDF5,...
#set(FLEUR_Fortran_FLAGS "-r8 -Isomepath")
## Add linker stuff. Here you should add the -L and -l options needed for the linker to
## find libraries. Please mind the format!
#set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} "-L$ENV{HOME/somepath;-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64")
......@@ -19,36 +19,34 @@ function configure_machine(){
then
echo "Intel toolchain used"
if module list 2>&1| grep -q Python &&
module list 2>&1| grep -q CMake &&
module list 2>&1| grep -q ELPA
#module list 2>&1| grep -q HDF5
then
echo "All required modules load loaded"
else
echo "You have to load the required modules"
echo "See and/or source $DIR/cmake/maschines/JURECA/intelsource.sh"
echo "See and/or source $DIR/cmake/machines/JURECA/intelsource.sh"
exit
fi
cp $DIR/cmake/maschines/JURECA/JURECA.cmake config.cmake
cp $DIR/cmake/machines/JURECA/JURECA.cmake config.cmake
elif module list 2>&1 |grep -q PGI
then
echo "PGI toolchain used"
if module list 2>&1| grep -q MVAPICH2 &&
module list 2>&1| grep -q CMake &&
[ -n "${MAGMA_ROOT}" ] &&
[ -n "${XML2_ROOT}" ]
then
echo "All required modules loaded, all variables set"
else
echo "Not all modules are loaded"
echo "See and/or source $DIR/cmake/maschines/JURECA/pgisource.sh"
echo "See and/or source $DIR/cmake/machines/JURECA/pgisource.sh"
echo "And set the variables XML2_ROOT and MAGMA_ROOT"
exit
fi
cp $DIR/cmake/maschines/JURECA/JURECAGPU.cmake config.cmake
cp $DIR/cmake/machines/JURECA/JURECAGPU.cmake config.cmake
else
echo "You have to load the correct modules for compiling"
echo " Look for files to source in $DIR/cmake/maschines/JURECA"
echo " Look for files to source in $DIR/cmake/machines/JURECA"
exit
fi
# JUQUEEN
......@@ -64,13 +62,13 @@ function configure_machine(){
echo "module load hdf5/1.8.15_BGQ scalapack/2.0.2_elpa_simd"
exit
fi
cp $DIR/cmake/maschines/JUQUEEN/JUQUEEN.cmake config.cmake
cp $DIR/cmake/machines/JUQUEEN/JUQUEEN.cmake config.cmake
#IFF linux cluster
elif [ "$machine" = "IFF" ]
then
echo "IFF cluster configuration used"
cp $DIR/cmake/maschines/IFF.cmake config.cmake
cp $DIR/cmake/machines/IFF.cmake config.cmake
#RWTH cluster
elif [ "$machine" = "CLAIX" ]
......@@ -81,7 +79,7 @@ function configure_machine(){
echo "Please use intelmpi, e.g. do a module switch openmpi intelmpi"
exit
fi
cp $DIR/cmake/maschines/CLAIX.cmake config.cmake
cp $DIR/cmake/machines/CLAIX.cmake config.cmake
module load LIBRARIES
elif [ "$machine" = "MARCONI" ]
then
......@@ -90,11 +88,17 @@ module load LIBRARIES
echo "Load the modules needed to compile: intel,intelmpi,cmake"
exit
fi
cp $DIR/cmake/maschines/MARCONI.cmake config.cmake
cp $DIR/cmake/machines/MARCONI.cmake config.cmake
elif [ "$machine" = "AUTO" ]
then
echo "No machine specific settings used"
echo "GOOD LUCK!"
if [ -r ../config.cmake ]
then
echo "Using AUTO-mode with user provided config.cmake"
cp ../config.cmake .
else
echo "No machine specific settings used"
echo "GOOD LUCK!"
fi
else
echo "No valid machine configuration specified"
exit
......
module load hdf5/1.8.15_BGQ scalapack/2.0.2_elpa_simd
......@@ -3,11 +3,10 @@ set(CMAKE_Fortran_COMPILER mpif90)
set(CMAKE_C_COMPILER mpicc)
#Add include pathes
#set(CMAKE_C_FLAGS " -I$ENV{XML2_ROOT}/include")
set(FLEUR_LIBRARIES "-lstdc++;-L$ENV{MKLROOT}/lib/intel64;-lmkl_scalapack_lp64;-lmkl_intel_lp64;-lmkl_pgi_thread;-lmkl_core;-lmkl_blacs_intelmpi_lp64"")
if (ENV{MAGMA_ROOT})
set(FLEUR_Fortran_FLAGS " -I$ENV{MAGMA_ROOT}/include")
set(FLEUR_LIBRARIES "-L$ENV{MAGMA_ROOT}/lib;-lmagma")
set(FLEUR_LIBRARIES "${FLEUR_LIBARIES};-L$ENV{MAGMA_ROOT}/lib;-lmagma")
endif()
#Linker Stuff
#set(FLEUR_LIBRARIES "-L$ENV{XML2_ROOT}/lib;-lxml2;-lz;-L$ENV{MAGMA_ROOT}/lib;-lmagma")
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_AIX")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_AIX")
ml purge
ml CMake GCC Python ParaStationMPI
ml OpenBLAS
export FC=mpif90
ml purge
ml use /usr/local/software/jureca/OtherStages
ml Stages/2016a
ml intel-para CMake HDF5 ELPA/2015.11.001-hybrid Python
ml CMake intel-para HDF5 ELPA/2015.11.001-hybrid Python
ml purge
ml CMake PGI MVAPICH2 libxml2/.2.9.4 imkl
ml purge
ml PGI MVAPICH2 CMake libxml2/.2.9.4 imkl
......@@ -20,7 +20,6 @@ then
cmake/machines.sh in this case :-)
In addition you can modify some environment variables:
FLEUR_NO_SERIAL -- if defined no serial executables will be build
FC -- name of Fortran compiler
CC -- name of C compiler
FLEUR_LIBRARIES -- list of linker arguments i.e. '-L/lib;-lbla'
......@@ -78,6 +77,11 @@ cd $buildname
#Now check the machine and set some defaults
machine=$1
if [[ $machine =~ FLEUR_CONFIG_MACHINE ]]
then
machine=$FLEUR_CONFIG_MACHINE
fi
echo "Machine config:$machine"
configure_machine
#run cmake
......
......@@ -98,8 +98,6 @@ CONTAINS
LOGICAL,OPTIONAL,INTENT(IN) :: realdata
!Locals
REAL :: time1
REAL :: time2
INTEGER :: ndim,err,n,nn,i,ndim1
LOGICAL :: parallel
CHARACTER(len=20)::f
......
......@@ -76,7 +76,6 @@ CONTAINS
!to select real/complex data
LOGICAL:: l_real
l_real=zMat%l_real
! IF (l_real.AND.PRESENT(a_c)) CALL juDFT_error("BUG in franza, call either with real OR complex data")
IF (l_real) THEN
......@@ -161,7 +160,6 @@ CONTAINS
ENDIF
ENDDO
nsize=nred
ENDIF
!-gu
! --> start with Cholesky factorization of b ( so that b = l * l^t)
......@@ -228,9 +226,9 @@ CONTAINS
ENDDO
ENDIF
IF (l_real) THEN
zMat%z_r = zz_r(:,:ne)
zMat%z_r(:,:ne) = zz_r(:,:ne)
ELSE
zMat%z_c = zz_c(:,:ne)
zMat%z_c(:,:ne) = zz_c(:,:ne)
END IF
!
IF (ne.GT.neigd) THEN
......
This diff is collapsed.
......@@ -224,7 +224,7 @@ CONTAINS
nc = 1+kii/n_size
ii = nc*(nc-1)/2*n_size-(nc-1)*(n_size-n_rank-1)
IF ( (n_size==1).OR.(kii+1<=lapw%nv(1)) ) THEN !
aahlp(ii+1:ii+ki) = aahlp(ii+1:ii+ki)+MATMUL(CONJG(ax(:ki,:lmp)),a(ki,:,iintsp))+MATMUL(CONJG(bx(:ki,:lmp)),b(ki,:lmp,iintsp))
aahlp(ii+1:ii+ki) = aahlp(ii+1:ii+ki)+MATMUL(CONJG(ax(:ki,:lmp)),a(ki,:lmp,iintsp))+MATMUL(CONJG(bx(:ki,:lmp)),b(ki,:lmp,iintsp))
ELSE ! components for <2||2> block unused
aa_tmphlp(:ki) = MATMUL(CONJG(ax(:ki,:lmp)),a(ki,:lmp,iintsp))+MATMUL(CONJG(bx(:ki,:DIMENSION%lmd)),b(ki,:lmp,iintsp))
!---> spin-down spin-down part
......@@ -254,7 +254,7 @@ CONTAINS
ii = (lapw%nv(1)+atoms%nlotot+ki-1)*(lapw%nv(1)+atoms%nlotot+ki)/2
ENDIF
aa_c(ii+1:ii+kjmax) = aa_c(ii+1:ii+kjmax) + chihlp*&
(MATMUL(CONJG(ax(:kjmax,:lmp)),a(ki,:,iintsp))+MATMUL(CONJG(bx(:kjmax,:lmp)),b(ki,:lmp,iintsp)))
(MATMUL(CONJG(ax(:kjmax,:lmp)),a(ki,:lmp,iintsp))+MATMUL(CONJG(bx(:kjmax,:lmp)),b(ki,:lmp,iintsp)))
ELSE
nc = 1+kii/n_size
ii = nc*(nc-1)/2*n_size- (nc-1)*(n_size-n_rank-1)
......
......@@ -125,7 +125,7 @@
taualAux(1,i) = atoms%taual(1,i) - FLOOR(atoms%taual(1,i))
taualAux(2,i) = atoms%taual(2,i) - FLOOR(atoms%taual(2,i))
taualAux(3,i) = atoms%taual(3,i) - FLOOR(atoms%taual(3,i))
posAux(:,i) = matmul(amatAux,taualAux(:,i))
posAux(:,i) = MATMUL(amatAux,taualAux(:,i))
END DO
! 2. Get minimal and maximal coordinates for auxiliary unit cell
......
MODULE m_stepf
USE m_juDFT
USE m_cdn_io
CONTAINS
SUBROUTINE stepf(sym,stars,atoms,oneD, input,cell, vacuum)
!
......@@ -30,8 +31,9 @@
COMPLEX c_c,c_phs
REAL c,dd,gs,th,inv_omtil,r_phs
REAL g_rmt,g_sqr,help,g_abs,fp_omtil,r_c,gr,gx,gy
INTEGER i,k,n,n3,na,nn,i1,i2,i3,ic,ifft2d,ifftd,kk
INTEGER i,k,n,na,nn,i1,i2,i3,ic,ifft2d,ifftd,kk
INTEGER ic1,ic2,ic3,icc,im1,im2,im3,loopstart
LOGICAL l_error
! ..
! .. Local Arrays ..
COMPLEX sf(stars%ng3)
......@@ -40,21 +42,14 @@
INTEGER, ALLOCATABLE :: icm(:,:,:)
! ..
! ..
!---> if step function on unit14, then just read it in
!---> if step function stored on disc, then just read it in
!
ifftd = 27*stars%mx1*stars%mx2*stars%mx3
!
OPEN (14,file='wkf2',form='unformatted',status='unknown')
REWIND 14
READ (14,END=10,err=10) n3,n
IF (n3.NE.stars%ng3) GO TO 10
IF (n.NE.ifftd) GO TO 10
READ (14) (stars%ustep(i),i=1,stars%ng3)
READ (14) (stars%ufft(i),i=0,ifftd-1)
CLOSE (14)
RETURN
10 CONTINUE
CALL readStepfunction(stars,l_error)
IF(.NOT.l_error) THEN
RETURN
END IF
IF (input%film) THEN
dd = vacuum%dvac*cell%area/cell%omtil
......@@ -262,13 +257,7 @@
DEALLOCATE ( bfft , icm )
!---> store on unit14
REWIND 14
WRITE (14) stars%ng3,ifftd
WRITE (14) (stars%ustep(i),i=1,stars%ng3)
WRITE (14) (stars%ufft(i),i=0,ifftd-1)
CLOSE (14)
CALL writeStepfunction(stars)
END SUBROUTINE stepf
END MODULE m_stepf
This diff is collapsed.
......@@ -47,21 +47,21 @@
! matrices of lattice vectors in full Cartesian units
DO i=1,3
amat(i,1) = aa*scale(i)*a1(i)
amat(i,2) = aa*scale(i)*a2(i)
amat(i,3) = aa*scale(i)*a3(i)
amat(i,1) = aa*scale(1)*a1(i)
amat(i,2) = aa*scale(2)*a2(i)
amat(i,3) = aa*scale(3)*a3(i)
ENDDO
DO i=1,3
bmat(1,i) = (pi_const/(aa*scale(i))) * b1(i)
bmat(2,i) = (pi_const/(aa*scale(i))) * b2(i)
bmat(3,i) = (pi_const/(aa*scale(i))) * b3(i)
bmat(1,i) = (pi_const/(aa*scale(1))) * b1(i)
bmat(2,i) = (pi_const/(aa*scale(2))) * b2(i)
bmat(3,i) = (pi_const/(aa*scale(3))) * b3(i)
ENDDO
DO i=1,3
amatinv(1,i) = (1.0/(aa*scale(i))) * b1(i)
amatinv(2,i) = (1.0/(aa*scale(i))) * b2(i)
amatinv(3,i) = (1.0/(aa*scale(i))) * b3(i)
amatinv(1,i) = (1.0/(aa*scale(1))) * b1(i)
amatinv(2,i) = (1.0/(aa*scale(2))) * b2(i)
amatinv(3,i) = (1.0/(aa*scale(3))) * b3(i)
ENDDO
!---> check that amat and amatinv consistent
......
This diff is collapsed.
This diff is collapsed.
......@@ -253,7 +253,7 @@ CONTAINS
IF (.NOT.PRESENT(k2).OR..NOT.PRESENT(k3)) CALL juDFT_error("BUG: always read k1,k2,k3")
k1=d%eig_int(3+1:3+size(k1),nrec)
k2=d%eig_int(3+d%nmat+1:3+d%nmat+size(k1),nrec)
k3=d%eig_int(3+2*d%nmat+1:3+2*d%nmat*size(k1),nrec)
k3=d%eig_int(3+2*d%nmat+1:3+2*d%nmat+size(k1),nrec)
ENDIF
IF (PRESENT(kveclo)) kveclo=d%eig_int(4+3*d%nmat:3+3*d%nmat+SIZE(kveclo),nrec)
......
......@@ -66,7 +66,7 @@ MODULE m_pot_io
INTEGER(HID_T) :: fileID
#endif
INTEGER :: currentStarsIndex,currentLatharmsIndex
INTEGER :: currentStructureIndex
INTEGER :: currentStructureIndex,currentStepfunctionIndex
INTEGER :: potentialType
CHARACTER(LEN=30) :: archiveName
......@@ -76,7 +76,8 @@ MODULE m_pot_io
#ifdef CPP_HDF
INQUIRE(FILE='pot.hdf',EXIST=l_exist)
IF (l_exist) THEN
CALL openPOT_HDF(fileID,currentStarsIndex,currentLatharmsIndex,currentStructureIndex)
CALL openPOT_HDF(fileID,currentStarsIndex,currentLatharmsIndex,&
currentStructureIndex,currentStepfunctionIndex)
archiveName = 'illegalPotentialArchive'
IF (archiveType.EQ.POT_ARCHIVE_TYPE_TOT_const) THEN
......@@ -97,7 +98,8 @@ MODULE m_pot_io
END IF
IF(l_exist) THEN
CALL openPOT_HDF(fileID,currentStarsIndex,currentLatharmsIndex,currentStructureIndex)
CALL openPOT_HDF(fileID,currentStarsIndex,currentLatharmsIndex,&
currentStructureIndex,currentStepfunctionIndex)
CALL readPotentialHDF(fileID, archiveName, potentialType,&
iter,fr,fpw,fz,fzxy)
......@@ -184,7 +186,7 @@ MODULE m_pot_io
INTEGER(HID_T) :: fileID
#endif
INTEGER :: currentStarsIndex,currentLatharmsIndex
INTEGER :: currentStructureIndex
INTEGER :: currentStructureIndex,currentStepfunctionIndex
INTEGER :: potentialType
CHARACTER(LEN=30) :: archiveName
......@@ -195,7 +197,8 @@ MODULE m_pot_io
IF(mode.EQ.POT_HDF5_MODE) THEN
#ifdef CPP_HDF
CALL openPOT_HDF(fileID,currentStarsIndex,currentLatharmsIndex,currentStructureIndex)
CALL openPOT_HDF(fileID,currentStarsIndex,currentLatharmsIndex,&
currentStructureIndex,currentStepfunctionIndex)
l_storeIndices = .FALSE.
IF (currentStarsIndex.EQ.0) THEN
......@@ -213,6 +216,11 @@ MODULE m_pot_io
l_storeIndices = .TRUE.
CALL writeStructureHDF(fileID, input, atoms, cell, vacuum, oneD, currentStructureIndex)
END IF
IF(currentStepfunctionIndex.EQ.0) THEN
currentStepfunctionIndex = 1
l_storeIndices = .TRUE.
CALL writeStepfunctionHDF(fileID, currentStepfunctionIndex, currentStarsIndex, stars)
END IF
archiveName = 'illegalPotentialArchive'
IF (archiveType.EQ.POT_ARCHIVE_TYPE_TOT_const) THEN
......@@ -239,11 +247,11 @@ MODULE m_pot_io
END IF
CALL writePotentialHDF(input, fileID, archiveName, potentialType,&
currentStarsIndex, currentLatharmsIndex, currentStructureIndex,&
iter,fr,fpw,fzTemp,fzxyTemp)
currentStepfunctionIndex,iter,fr,fpw,fzTemp,fzxyTemp)
IF(l_storeIndices) THEN
CALL writePOTHeaderData(fileID,currentStarsIndex,currentLatharmsIndex,&
currentStructureIndex)
currentStructureIndex,currentStepfunctionIndex)
END IF
CALL closeCDNPOT_HDF(fileID)
......
......@@ -381,7 +381,7 @@ MODULE m_xmlOutput
IMPLICIT NONE
CHARACTER(LEN= 30), INTENT(IN) :: contentList(:)
CHARACTER(LEN= *), INTENT(IN) :: contentList(:)
CHARACTER(LEN=200), INTENT(INOUT) :: contentLineList(:)