Commit 932ae148 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' into inpgen

Conflicts:
	fermi/fermie.F90
	global/constants.f90
	global/find_enpara.f90
	hybrid/exchange_val_hf.F90
	hybrid/hf_setup.F90
	hybrid/hsfock.F90
	hybrid/hyb_abcrot.F90
	hybrid/hybrid.F90
	hybrid/kp_perturbation.F90
	hybrid/read_core.F90
	hybrid/subvxc.F90
	hybrid/symm_hf.F90
	hybrid/symmetrizeh.F90
	hybrid/trafo.F90
	hybrid/wavefproducts.F90
	init/CMakeLists.txt
	init/old_inp/fleur_init_old.F90
	init/postprocessInput.F90
	io/r_inpXML.F90
	io/w_inpXML.f90
	io/xml/FleurInputSchema.xsd
	io/xmlIntWrapFort.f90
	kpoints/kptmop.f
	main/cdngen.F90
	main/fleur.F90
	main/fleur_init.F90
	mix/type_mixvector.F90
	types/types_enpara.F90
	types/types_gradients.f90
	types/types_kpts.f90
	types/types_setup.F90
	types/types_xcpot_inbuild.F90
	types/types_xcpot_libxc.F90
	vgen/vgen_xcpot.F90
	vgen/vis_xc.F90
	vgen/vmt_xc.F90
parents da660049 ecd2a603
......@@ -10,3 +10,5 @@ build.*
*.x
*.swp
tags
.DS_Store
.vscode
......@@ -8,9 +8,10 @@ stages:
build-gfortran-hdf5:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: build
cache:
artifacts:
paths:
- build
expire_in: 1h
script:
- cd /builds/fleur/fleur; ./configure.sh GITLAB; cd build; make -j 4
# only:
......@@ -21,9 +22,6 @@ build-gfortran-hdf5:
test-gfortran-hdf5:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: test
cache:
paths:
- build
script:
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";export OMP_NUM_THREADS=4;cd /builds/fleur/fleur/build;ctest
artifacts:
......@@ -39,10 +37,6 @@ test-gfortran-hdf5:
pages:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: deploy
cache:
paths:
- build
- public
script:
- echo "HTML should be ready from cache..."
- mv /builds/fleur/fleur/docs/Docu_main.html /builds/fleur/fleur/public/index.html
......@@ -53,17 +47,11 @@ pages:
paths:
- public
only:
- schedules
- triggers
- web
doxygen:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: html
cache:
paths:
- build
- public
script:
- cd /builds/fleur/fleur/build ; make doc
- mkdir ../public
......@@ -75,17 +63,16 @@ doxygen:
- build/fleur_MPI
- build/inpgen
only:
- schedules
- triggers
- web
build-pgi:
image: iffregistry.fz-juelich.de/fleur/fleur:pgi
stage: build
cache:
artifacts:
paths:
- build.pgi
expire_in: 1h
script:
- cd /builds/fleur/fleur; ./configure.sh -l pgi ; cd build.pgi; make
allow_failure: true
......@@ -100,9 +87,6 @@ test-pgi:
stage: test
dependencies:
- build-pgi
cache:
paths:
- build.pgi
script:
- cd /builds/fleur/fleur/build.pgi;ctest
allow_failure: true
......@@ -115,9 +99,10 @@ test-pgi:
build-intel-static:
image: iffregistry.fz-juelich.de/fleur/fleur:intel-static
stage: build
cache:
artifacts:
paths:
- build.intel-static
expire_in: 1h
script:
- set +e && source compilervars.sh intel64 && set -e ; ulimit -s unlimited
- cd /builds/fleur/fleur; ./configure.sh -l intel-static INTEL_DOCKER_STATIC ; cd build.intel-static; make -j 4
......@@ -137,9 +122,10 @@ build-intel-static:
build-intel:
image: iffregistry.fz-juelich.de/fleur/fleur:intel-static
stage: build
cache:
artifacts:
paths:
- build.intel.debug
expire_in: 1h
script:
- set +e && source compilervars.sh intel64 && set -e ; ulimit -s unlimited
- cd /builds/fleur/fleur; CC=gcc FC=mpiifort FLEUR_LIBRARIES="-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64" ./configure.sh -t -d -l intel INTEL_MPI ; cd build.intel.debug; make -j 4
......@@ -155,9 +141,6 @@ test-intel:
stage: test
dependencies:
- build-intel
cache:
paths:
- build.intel.debug
script:
- set +e && source compilervars.sh intel64 && set -e; ulimit -s unlimited
- cd /builds/fleur/fleur/build.intel.debug;ctest
......@@ -175,9 +158,6 @@ test-intel:
gfortran-coverage:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: html
cache:
paths:
- build
script:
- cd /builds/fleur/fleur; ./configure.sh -l coverage -flags --coverage GITLAB; cd build.coverage; make -j 4
- lcov --capture --initial -d CMakeFiles -o baseline.info
......@@ -195,4 +175,4 @@ gfortran-coverage:
url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html
only:
- web
- schedules
\ No newline at end of file
......@@ -74,6 +74,54 @@ CONTAINS
END DO ! loop over spins
END SUBROUTINE integrate_cdn
SUBROUTINE integrate_realspace(xcpot, atoms, sym, sphhar, input, &
stars, cell, oneD, vacuum, noco, mt, is, hint)
use m_types
use m_mt_tofrom_grid
use m_pw_tofrom_grid
use m_constants
implicit none
CLASS(t_xcpot), INTENT(inout) :: xcpot
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sym), INTENT(in) :: sym
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_input), INTENT(IN) :: input
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_oneD), INTENT(in) :: oneD
TYPE(t_vacuum), INTENT(in) :: vacuum
TYPE(t_noco), INTENT(in) :: noco
real, intent(inout) :: mt(:,:,:), is(:,:)
character(len=*), intent(in), optional :: hint
integer :: n_atm, i
TYPE(t_potden) :: tmp_potden
REAL :: q(input%jspins), qis(input%jspins), &
qmt(atoms%ntype,input%jspins), qvac(2,input%jspins),&
qtot, qistot
call tmp_potden%init(stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN)
call init_mt_grid(input%jspins, atoms, sphhar, xcpot, sym)
do n_atm =1,atoms%ntype
call mt_from_grid(atoms, sphhar, n_atm, input%jspins, mt(:,:,n_atm), &
tmp_potden%mt(:,0:,n_atm,:))
do i=1,atoms%jri(n_atm)
tmp_potden%mt(i,:,n_atm,:) = tmp_potden%mt(i,:,n_atm,:) * atoms%rmsh(i,n_atm)**2
enddo
enddo
call finish_mt_grid()
call init_pw_grid(xcpot, stars, sym, cell)
call pw_from_grid(xcpot, stars, .False., is, tmp_potden%pw)
call finish_pw_grid()
call integrate_cdn(stars,atoms,sym,vacuum,input,cell,oneD, tmp_potden, &
q, qis, qmt, qvac, qtot, qistot)
call print_cdn_inte(q, qis, qmt, qvac, qtot, qistot, hint)
END SUBROUTINE integrate_realspace
SUBROUTINE cdntot(stars,atoms,sym,vacuum,input,cell,oneD,&
den,l_printData,qtot,qistot)
......@@ -154,4 +202,29 @@ CONTAINS
CALL timestop("cdntot")
END SUBROUTINE cdntot
SUBROUTINE print_cdn_inte(q, qis, qmt, qvac, qtot, qistot, hint)
use ieee_arithmetic
implicit none
REAL, INTENT(in) :: q(:), qis(:), qmt(:,:), qvac(:,:), qtot, qistot
character(len=*), intent(in), optional :: hint
integer :: n_mt
if(present(hint)) write (*,*) "DEN of ", hint
write (*,*) "q = ", q
write (*,*) "qis = ", qis
write (*,*) "qmt"
do n_mt = 1,size(qmt, dim=1)
write (*,*) "mt = ", n_mt, qmt(n_mt,:)
enddo
if(.not. any(ieee_is_nan(qvac))) then
write (*, *) "qvac", qvac
endif
write (*, *) "qtot", qtot
write (*, *) "qis_tot", qistot
write (*, *) "-------------------------"
END SUBROUTINE print_cdn_inte
END MODULE m_cdntot
......@@ -88,14 +88,14 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
#endif
! Local Scalars
INTEGER :: ikpt,jsp_start,jsp_end,ispin,jsp
INTEGER :: ikpt,ikpt_i,jsp_start,jsp_end,ispin,jsp
INTEGER :: iErr,nbands,noccbd,iType
INTEGER :: skip_t,skip_tt,nStart,nEnd,nbasfcn
INTEGER :: skip_t,skip_tt,nbasfcn
LOGICAL :: l_orbcomprot, l_real, l_dosNdir, l_corespec
! Local Arrays
REAL, ALLOCATABLE :: we(:)
REAL, ALLOCATABLE :: eig(:)
REAL,ALLOCATABLE :: we(:),eig(:)
INTEGER,ALLOCATABLE :: ev_list(:)
REAL, ALLOCATABLE :: f(:,:,:,:),g(:,:,:,:),flo(:,:,:,:) ! radial functions
TYPE (t_lapw) :: lapw
......@@ -171,36 +171,28 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype))
IF (noco%l_soc.OR.noco%l_noco) skip_tt = 2 * skip_tt
ALLOCATE (we(MAXVAL(cdnvalJob%noccbd(:))))
ALLOCATE (eig(MAXVAL(cdnvalJob%noccbd(:))))
jsp = MERGE(1,jspin,noco%l_noco)
DO ikpt = cdnvalJob%ikptStart, cdnvalJob%nkptExtended, cdnvalJob%ikptIncrement
jsp = MERGE(1,jspin,noco%l_noco)
IF (ikpt.GT.kpts%nkpt) THEN
#ifdef CPP_MPI
CALL MPI_BARRIER(mpi%mpi_comm,iErr) ! Synchronizes the RMA operations
#endif
EXIT
END IF
DO ikpt_i = 1,size(cdnvalJob%k_list)
ikpt=cdnvalJob%k_list(ikpt_i)
CALL lapw%init(input,noco, kpts,atoms,sym,ikpt,cell,.false., mpi)
skip_t = skip_tt
noccbd = cdnvalJob%noccbd(ikpt)
nStart = cdnvalJob%nStart(ikpt)
nEnd = cdnvalJob%nEnd(ikpt)
we(1:noccbd) = cdnvalJob%weights(1:noccbd,ikpt)
eig(1:noccbd) = results%eig(nStart:nEnd,ikpt,jsp)
ev_list=cdnvaljob%compact_ev_list(ikpt_i,banddos%dos)
noccbd = SIZE(ev_list)
we = cdnvalJob%weights(ev_list,ikpt)
eig = results%eig(ev_list,ikpt,jsp)
IF (cdnvalJob%l_evp) THEN
IF (nStart > skip_tt) skip_t = 0
IF (nEnd <= skip_tt) skip_t = noccbd
IF ((nStart <= skip_tt).AND.(nEnd > skip_tt)) skip_t = mod(skip_tt,noccbd)
IF (minval(ev_list) > skip_tt) skip_t = 0
IF (maxval(ev_list) <= skip_tt) skip_t = noccbd
IF ((minval(ev_list) <= skip_tt).AND.(maxval(ev_list) > skip_tt)) skip_t = mod(skip_tt,noccbd)
END IF
nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco)
CALL zMat%init(l_real,nbasfcn,noccbd)
CALL read_eig(eig_id,ikpt,jsp,n_start=nStart,n_end=nEnd,neig=nbands,zmat=zMat)
CALL read_eig(eig_id,ikpt,jsp,list=ev_list,neig=nbands,zmat=zMat)
#ifdef CPP_MPI
CALL MPI_BARRIER(mpi%mpi_comm,iErr) ! Synchronizes the RMA operations
#endif
......
......@@ -144,11 +144,11 @@ CONTAINS
ENDIF
IF (noco%l_noco) THEN
!---> generate the complex conjgates of the spinors (chi)
ccchi(1,1) = CONJG( EXP(-ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2))
ccchi(1,2) = CONJG(-EXP(-ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2))
ccchi(2,1) = CONJG( EXP( ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2))
ccchi(2,2) = CONJG( EXP( ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2))
!---> generate the spinors (chi)
ccchi(1,1) = EXP(ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2)
ccchi(1,2) = -EXP(ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2)
ccchi(2,1) = EXP(-ImagUnit*noco%alph(n)/2)*SIN(noco%beta(n)/2)
ccchi(2,2) = EXP(-ImagUnit*noco%alph(n)/2)*COS(noco%beta(n)/2)
IF (noco%l_ss) THEN
!---> the coefficients of the spin-down basis functions are
!---> stored in the second half of the eigenvector
......@@ -188,7 +188,7 @@ CONTAINS
wronk = usdus%uds(l,n,jspin)*usdus%dus(l,n,jspin) - usdus%us(l,n,jspin)*usdus%duds(l,n,jspin)
IF (apw(l,n)) THEN
fj(l) = 1.0*const * fj(l)/usdus%us(l,n,jspin)
dfj(l) = 0.0d0
dfj(l) = 0.0
ELSE
dfj(l) = const* (usdus%dus(l,n,jspin)*fj(l)-df*usdus%us(l,n,jspin))/wronk
fj(l) = const* (df*usdus%uds(l,n,jspin)-fj(l)*usdus%duds(l,n,jspin))/wronk
......
......@@ -107,7 +107,7 @@ CONTAINS
wronk = usdus%uds(l,n,jspin)*usdus%dus(l,n,jspin)-usdus%us(l,n,jspin)*usdus%duds(l,n,jspin) !Wronski determinante
IF (apw(l,n)) THEN
fj(l) = 1.0*const * fj(l)/usdus%us(l,n,jspin)
dfj(l) = 0.0d0
dfj(l) = 0.0
ELSE
dfj(l) = const* (usdus%dus(l,n,jspin)*fj(l)-df*usdus%us(l,n,jspin))/wronk
fj(l) = const* (df*usdus%uds(l,n,jspin)-fj(l)*usdus%duds(l,n,jspin))/wronk
......
......@@ -31,16 +31,21 @@ SUBROUTINE orbMagMoms(input,atoms,noco,clmom)
WRITE (6,FMT=9020)
CALL openXMLElement('orbitalMagneticMomentsInMTSpheres',(/'units'/),(/'muBohr'/))
DO iType = 1, atoms%ntype
IF (noco%l_noco) THEN
thetai = noco%beta(iType)
phii = noco%alph(iType)
END IF
! magn. moment(-)
slxmom = clmom(1,iType,1)+clmom(1,iType,2)
slymom = clmom(2,iType,1)+clmom(2,iType,2)
slmom = clmom(3,iType,1)+clmom(3,iType,2)
IF (noco%l_noco) THEN
thetai = noco%beta(iType)
phii = noco%alph(iType)
!Fix of sign of moment in first variation calculations. Perhaps it would be better to understand this :-(
!slxmom=-1*slxmom
slymom=-1*slymom
!slmom=-1*slmom
END IF
! rotation: orbital moment || spin moment (extended to incude phi - hopefully)
slmom = cos(thetai)*slmom + sin(thetai)*(cos(phii)*slxmom + sin(phii)*slymom)
clmom(3,iType,1) = cos(thetai)*clmom(3,iType,1) + &
......
......@@ -16,9 +16,20 @@ elseif (EXISTS ${CMAKE_SOURCE_DIR}/version)
file(READ ${CMAKE_SOURCE_DIR}/version git_describe)
endif()
#normalize the strings
string(STRIP ${git_hash} git_hash)
string(STRIP ${git_describe} git_describe)
string(STRIP ${git_branch} git_branch)
#normalize the strings, fix for problems in git commands above
if (git_hash)
string(STRIP ${git_hash} git_hash)
else()
set(git_hash unkown)
endif()
if (git_describe)
string(STRIP ${git_describe} git_describe)
else()
set(git_describe unkown)
endif()
if (git_branch)
string(STRIP ${git_branch} git_branch)
else()
set(git_branch unkown)
endif()
file(GENERATE OUTPUT ${CMAKE_SOURCE_DIR}/init/compileinfo.h CONTENT "gitdesc=\"${git_describe}\"\ncompile_date=\"${compile_time}\"\ncompile_user=\"${compile_user}\"\ncompile_host=\"${compile_host}\"\ngitbranch=\"${git_branch}\"\ngithash=\"${git_hash}\"\ncompile_flags=\"${CMAKE_Fortran_FLAGS}\"\nlink_flags=\"${FLEUR_LIBRARIES}\"\n")
......@@ -17,8 +17,9 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -qopenmp -assume byterecl")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O2 -g")
#set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xMIC-AVX512 -O2")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "19.0.0.0")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit -check pointers -DCPP_DEBUG -warn=all")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit -check pointers -DCPP_DEBUG -warn all")
else()
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -CB -traceback -O0 -g -ftrapuv -check uninit -check pointers -DCPP_DEBUG")
endif()
......
export CRAYPE_LINK_TYPE=dynamic
......@@ -4,7 +4,6 @@ export CC=${CC:=mpiicc}
export CXX=${CXX:=mpiicpc}
#Set environment variables usefull for external dependencies, e.g. ELPA
export CFLAGS=-mkl
export CMAKE_Fortran_FLAGS="$CMAKE_Fortran_FLAGS -mkl"
export FCFLAGS=-mkl
export LIBS="-mkl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
......
#Set the compilers to mpiifort, mpiicc, mpiicpc
export FC=${FC:=mpif90.openmpi}
FLEUR_INCLUDEDIR="/usr/include/hdf5/serial"
FLEUR_LIBRARIES="-lhdf5_serial_fortran -lhdf5_serial -lblacsF77init-openmpi -lblacs-openmpi -lscalapack-openmpi"
#Set environment variables usefull for external dependencies, e.g. ELPA
export CMAKE_Fortran_FLAGS="$CMAKE_Fortran_FLAGS -I/usr/include/hdf5/serial"
export LIBS="-lhdf5_serial_fortran -lhdf5_serial -lblacsF77init-openmpi -lblacs-openmpi -lscalapack-openmpi"
export SCALAPACK_LDFLAGS="-lblacsF77init-openmpi -lblacs-openmpi -lscalapack-openmpi"
......@@ -16,9 +16,10 @@ if (DEFINED CLI_FLEUR_USE_MPI)
set(FLEUR_USE_MPI FALSE)
endif()
endif()
endif()
endif()
if (FLEUR_USE_MPI)
If (FLEUR_USE_MPI)
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_MPI")
set(FLEUR_USE_SERIAL FALSE)
else()
......@@ -27,4 +28,4 @@ endif()
if (DEFINED CLI_FLEUR_USE_SERIAL)
set(FLEUR_USE_SERIAL CLI_FLEUR_USE_SERIAL)
endif()
\ No newline at end of file
endif()
......@@ -14,7 +14,7 @@ if (DEFINED FLEUR_USE_HDF5)
set(JUDFT_COMPILE_HDF5 ON CACHE BOOL "The HDF5 is compiled as submodule")
endif()
if (DEFINED FLEUR_USE_HDF5MPI)
set(JUDFT_USE_HDF5MPI FLEUR_USE_HDF5MPI CACHE BOOL "Is the HDF5 version able to do parallel IO" )
set(JUDFT_USE_HDF5MPI ${FLEUR_USE_HDF5MPI} CACHE BOOL "Is the HDF5 version able to do parallel IO" )
endif()
if (DEFINED FLEUR_HDF5_LIBRARIES)
message("SET:${FLEUR_HDF5_LIBRARIES}")
......
......@@ -23,7 +23,8 @@ echo "------------ Welcome to the FLEUR configuration script -------------"
#Check if we are using the git version and update if pull was used as an argument
if test -d $DIR/.git
if test -d $DIR/.git
then
#Check if hook is installed and install it if needed
if test -h $DIR/.git/hooks/pre-commit
then
......@@ -33,13 +34,12 @@ if test -d $DIR/.git
ln -s $DIR/tests/git-hooks/pre-commit $DIR/.git/hooks
echo "Git version found, hook installed"
fi
then
if [ $gitupdate -gt 0 ]
then
if [ $gitupdate -gt 0 ]
then
cd $DIR
git pull
cd -
fi
fi
fi
......
......@@ -48,8 +48,11 @@ MODULE m_available_solvers
#else
INTEGER,PARAMETER:: diag_elpa_1node=-14
#endif
#ifdef CPP_SCALAPACK
INTEGER,PARAMETER:: diag_debugout=201
#else
INTEGER,PARAMETER:: diag_debugout=20
#endif
INTEGER,PARAMETER::diag_all_solver(9)=(/diag_elpa,diag_elemental,diag_scalapack,diag_magma,diag_chase,diag_cusolver,diag_lapack,diag_elpa_1node,diag_debugout/)
CONTAINS
......
......@@ -192,19 +192,19 @@ CONTAINS
n_col = indxl2g(i, nb, hmat%blacsdata%mycol, 0, hmat%blacsdata%npcol)
n_row = numroc (n_col, nb, hmat%blacsdata%myrow, 0, hmat%blacsdata%nprow)
IF (hmat%l_real) THEN
hmat%data_r(n_row+1:hmat%matsize1,i) = 0.d0
hmat%data_r(n_row+1:hmat%matsize1,i) = 0.0
ELSE
hmat%data_c(n_row+1:hmat%matsize1,i) = 0.d0
hmat%data_c(n_row+1:hmat%matsize1,i) = 0.0
ENDIF
ENDDO
! Use the ev_dist array to store the calculated values for the lower part.
IF (hmat%l_real) THEN
CALL pdtran(hmat%global_size1,hmat%global_size1,1.d0,hmat%data_r,1,1,&
hmat%blacsdata%blacs_desc,0.d0,ev_dist%data_r,1,1,ev_dist%blacsdata%blacs_desc)
CALL pdtran(hmat%global_size1,hmat%global_size1,1.0,hmat%data_r,1,1,&
hmat%blacsdata%blacs_desc,0.0,ev_dist%data_r,1,1,ev_dist%blacsdata%blacs_desc)
ELSE
CALL pztranc(hmat%global_size1,hmat%global_size2,cmplx(1.d0,0.d0),hmat%data_c,1,1,&
hmat%blacsdata%blacs_desc,cmplx(0.d0,0.d0),ev_dist%data_c,1,1,ev_dist%blacsdata%blacs_desc)
CALL pztranc(hmat%global_size1,hmat%global_size2,cmplx(1.0,0.0),hmat%data_c,1,1,&
hmat%blacsdata%blacs_desc,cmplx(0.0,0.0),ev_dist%data_c,1,1,ev_dist%blacsdata%blacs_desc)
ENDIF
! Copy the calculated values to the lower part of the H matrix
......@@ -259,11 +259,11 @@ CONTAINS
! 2b. tmp2 = ev_dist**T
IF (hmat%l_real) THEN
CALL pdtran(ev_dist%global_size1,ev_dist%global_size1,1.d0,ev_dist%data_r,1,1,&
ev_dist%blacsdata%blacs_desc,0.d0,tmp2_r,1,1,ev_dist%blacsdata%blacs_desc)
CALL pdtran(ev_dist%global_size1,ev_dist%global_size1,1.0,ev_dist%data_r,1,1,&
ev_dist%blacsdata%blacs_desc,0.0,tmp2_r,1,1,ev_dist%blacsdata%blacs_desc)
ELSE
CALL pztranc(ev_dist%global_size1,ev_dist%global_size1,cmplx(1.0,0.0),ev_dist%data_c,1,1,&
ev_dist%blacsdata%blacs_desc,cmplx(0.d0,0.d0),tmp2_c,1,1,ev_dist%blacsdata%blacs_desc)
ev_dist%blacsdata%blacs_desc,cmplx(0.0,0.0),tmp2_c,1,1,ev_dist%blacsdata%blacs_desc)
ENDIF
! 2c. A = U**-T * tmp2 ( = U**-T * Aorig * U**-1 )
......@@ -307,11 +307,11 @@ CONTAINS
! Set lower half from upper half
IF (hmat%l_real) THEN
CALL pdtran(hmat%global_size1,hmat%global_size1,1.d0,hmat%data_r,1,1,&
hmat%blacsdata%blacs_desc,0.d0,ev_dist%data_r,1,1,ev_dist%blacsdata%blacs_desc)
CALL pdtran(hmat%global_size1,hmat%global_size1,1.0,hmat%data_r,1,1,&
hmat%blacsdata%blacs_desc,0.0,ev_dist%data_r,1,1,ev_dist%blacsdata%blacs_desc)
ELSE
CALL pztranc(hmat%global_size1,hmat%global_size1,cmplx(1.0,0.0),hmat%data_c,1,1,&
hmat%blacsdata%blacs_desc,cmplx(0.d0,0.d0),ev_dist%data_c,1,1,ev_dist%blacsdata%blacs_desc)
hmat%blacsdata%blacs_desc,cmplx(0.0,0.0),ev_dist%data_c,1,1,ev_dist%blacsdata%blacs_desc)
ENDIF
......@@ -396,11 +396,11 @@ CONTAINS
! mult_ah_b_complex needs the transpose of U**-1, thus tmp2 = (U**-1)**T
IF (hmat%l_real) THEN
CALL pdtran(smat%global_size1,smat%global_size1,1.d0,smat%data_r,1,1,&
smat%blacsdata%blacs_desc,0.d0,tmp2_r,1,1,smat%blacsdata%blacs_desc)
CALL pdtran(smat%global_size1,smat%global_size1,1.0,smat%data_r,1,1,&
smat%blacsdata%blacs_desc,0.0,tmp2_r,1,1,smat%blacsdata%blacs_desc)
ELSE
CALL pztranc(smat%global_size1,smat%global_size1,cmplx(1.d0,0.d0),smat%data_c,1,1,&
smat%blacsdata%blacs_desc,cmplx(0.d0,0.d0),tmp2_c,1,1,smat%blacsdata%blacs_desc)