Commit 4bd51c35 authored by Daniel Wortmann's avatar Daniel Wortmann

Small modifications to help PGI compiler and to clean up.

parent 42a10afe
......@@ -19,32 +19,34 @@ CONTAINS
REAL :: max_imag
!Check if we could exploit a real matrix even without inversion symmetry
realcomplex:IF (.NOT.noco%l_noco.AND..NOT.hmat%l_real) THEN
IF (ALL(ABS(kpts%bk(:,nk))<1E-10)) THEN
max_imag=MAXVAL(ABS(AIMAG(hmat%data_c)))
IF (max_imag>1e-10) THEN
PRINT *,"Real matrix expected but imaginary part is:",max_imag
RETURN
ENDIF
IF (mpi%irank==0) THEN
PRINT *,"Complex matrix made real"
WRITE(6,*) "Complex matrix made real"
END IF
SELECT TYPE(hmat)
TYPE IS(t_mat)
realcomplex:IF (.NOT.noco%l_noco.AND..NOT.hmat%l_real) THEN
IF (ALL(ABS(kpts%bk(:,nk))<1E-10)) THEN
max_imag=MAXVAL(ABS(AIMAG(hmat%data_c)))
IF (max_imag>1e-10) THEN
PRINT *,"Real matrix expected but imaginary part is:",max_imag
RETURN
ENDIF
!We are using Gamma point, so matrix should be real
IF (ALLOCATED(smat%data_r)) DEALLOCATE(smat%data_r)
ALLOCATE(smat%data_r(SIZE(smat%data_c,1),SIZE(smat%data_c,2)))
smat%data_r=smat%data_c;smat%l_real=.TRUE.
DEALLOCATE(smat%data_c)
IF (ALLOCATED(hmat%data_r)) DEALLOCATE(hmat%data_r)
ALLOCATE(hmat%data_r(SIZE(hmat%data_c,1),SIZE(hmat%data_c,2)))
hmat%data_r=hmat%data_c;hmat%l_real=.TRUE.
DEALLOCATE(hmat%data_c)
ENDIF
ENDIF realcomplex
IF (mpi%irank==0) THEN
PRINT *,"Complex matrix made real"
WRITE(6,*) "Complex matrix made real"
END IF
!We are using Gamma point, so matrix should be real
IF (ALLOCATED(smat%data_r)) DEALLOCATE(smat%data_r)
ALLOCATE(smat%data_r(SIZE(smat%data_c,1),SIZE(smat%data_c,2)))
smat%data_r=smat%data_c;smat%l_real=.TRUE.
DEALLOCATE(smat%data_c)
IF (ALLOCATED(hmat%data_r)) DEALLOCATE(hmat%data_r)
ALLOCATE(hmat%data_r(SIZE(hmat%data_c,1),SIZE(hmat%data_c,2)))
hmat%data_r=hmat%data_c;hmat%l_real=.TRUE.
DEALLOCATE(hmat%data_c)
ENDIF
ENDIF realcomplex
END SELECT
END SUBROUTINE symmetrize_matrix
END MODULE m_symmetrize_matrix
......@@ -101,6 +101,10 @@ CONTAINS
DO jsp = 1,input%jspins
CALL read_eig(&
eig_id,nk,jsp, neig=ne,eig=eig(:,jsp))
IF (judft_was_argument("-debugtime")) THEN
WRITE(6,*) "Non-SOC ev for nk,jsp:",nk,jsp
WRITE(6,"(6(f10.6,1x))") eig(:ne,jsp)
ENDIF
CALL read_eig(&
eig_id,nk,jsp,&
n_start=1,n_end=ne,&
......
......@@ -158,7 +158,7 @@ MODULE m_xmlOutput
CHARACTER(LEN=*), INTENT(IN) :: attributeNames(:)
CLASS(*), INTENT(IN) :: attributeValues(:)
INTEGER, INTENT(IN) :: lengths(:,:)
CLASS(*), INTENT(IN), OPTIONAL :: contentList(:)
CLASS(*), INTENT(IN), OPTIONAL :: contentList(1:)
CHARACTER(LEN= 30), ALLOCATABLE :: charAttributeValues(:)
CHARACTER(LEN= 30), ALLOCATABLE :: charContentList(:)
......@@ -195,12 +195,12 @@ MODULE m_xmlOutput
DO i = 1, SIZE(contentList)
SELECT TYPE(contentList)
TYPE IS(INTEGER)
#ifndef __PGI
WRITE(charContentList(i),'(i0)') contentList(i)
TYPE IS(REAL)
WRITE(charContentList(i),'(f19.10)') contentList(i)
TYPE IS(LOGICAL)
WRITE(charContentList(i),'(l1)') contentList(i)
#ifndef __PGI
TYPE IS(CHARACTER(LEN=*))
WRITE(charContentList(i),'(a)') TRIM(ADJUSTL(contentList(i)))
CLASS DEFAULT
......
......@@ -14,7 +14,7 @@ set(InpTestdirs ${InpgenTests})
#Check if all tests (including those running for a long time) should be executed
if (all_tests)
set(Testdirs ${Testdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
set(ParTestdirs ${Testdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
set(ParTestdirs ${ParTestdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
endif()
#The inpgen tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment