Commit d7189e6a authored by Daniel Wortmann's avatar Daniel Wortmann

Bugfixes for INVS+SOC version

parent dd608d2d
......@@ -135,16 +135,12 @@ CONTAINS
!$ bcof_loc(:,:) = cmplx(0.0,0.0)
#if ( defined(CPP_SOC) && defined(CPP_INVERSION) )
!$ IF (invsat(natom).EQ.1) THEN
!$ ALLOCATE(acof_inv(nobd,0:lmd),bcof_inv(nobd,0:size(acof,2)-1))
!$ IF (atoms%invsat(natom).EQ.1) THEN
!$ ALLOCATE(acof_inv(nobd,0:size(acof,2)-1),bcof_inv(nobd,0:size(acof,2)-1))
!$ acof_inv(:,:) = cmplx(0.0,0.0)
!$ bcof_inv(:,:) = cmplx(0.0,0.0)
!$ ENDIF
#endif
!!!!
!$OMP DO
DO k = 1,nvmax
IF (.NOT.noco%l_noco) THEN
......@@ -236,22 +232,20 @@ CONTAINS
c_1 = c_0 * fj(l)
c_2 = c_0 * dfj(l)
! ----> loop over bands
!$ if (.false.) THEN
!$ if (.false.) THEN
DO i = 1,ne
acof(i,lm,natom) = acof(i,lm,natom) + &
& c_1 * work(i)
acof(i,lm,natom) = acof(i,lm,natom) + c_1 * work(i)
ENDDO
DO i = 1,ne
bcof(i,lm,natom) = bcof(i,lm,natom) +&
& c_2 * work(i)
bcof(i,lm,natom) = bcof(i,lm,natom) + c_2 * work(i)
ENDDO
!$ endif
!$ DO i = 1,ne
!$ acof_loc(i,lm) = acof_loc(i,lm) + c_1 * work(i)
!$ ENDDO
!$ DO i = 1,ne
!$ bcof_loc(i,lm) = bcof_loc(i,lm) + c_2 * work(i)
!$ ENDDO
!$ endif
!$ DO i = 1,ne
!$ acof_loc(i,lm) = acof_loc(i,lm) + c_1 * work(i)
!$ ENDDO
!$ DO i = 1,ne
!$ bcof_loc(i,lm) = bcof_loc(i,lm) + c_2 * work(i)
!$ ENDDO
#if ( defined(CPP_SOC) && defined(CPP_INVERSION) )
IF (atoms%invsat(natom).EQ.1) THEN
jatom = sym%invsatnr(natom)
......@@ -259,16 +253,12 @@ CONTAINS
inv_f = (-1)**(l-m)
c_1 = conjg(c_1) * inv_f
c_2 = conjg(c_2) * inv_f
!$ if (.false.) THEN
CALL CPP_BLAS_caxpy(ne,c_1,work,1,&
& acof(1,lmp,jatom),1)
CALL CPP_BLAS_caxpy(ne,c_2,work,1,&
& bcof(1,lmp,jatom),1)
!$ endif
!$ CALL CPP_BLAS_caxpy(ne,c_1,work,1,&
!$ acof_inv(1,lmp),1)
!$ CALL CPP_BLAS_caxpy(ne,c_2,work,1,&
!$ bcof_inv(1,lmp),1)
!$ if (.false.) THEN
CALL CPP_BLAS_caxpy(ne,c_1,work,1, acof(1,lmp,jatom),1)
CALL CPP_BLAS_caxpy(ne,c_2,work,1, bcof(1,lmp,jatom),1)
!$ endif
!$ CALL CPP_BLAS_caxpy(ne,c_1,work,1,acof_inv(1,lmp),1)
!$ CALL CPP_BLAS_caxpy(ne,c_2,work,1,bcof_inv(1,lmp),1)
ENDIF
#endif
ENDDO ! loop over m
......@@ -283,8 +273,8 @@ CONTAINS
!$ acof(:,:,natom) = acof(:,:,natom) + acof_loc(:,:)
!$ bcof(:,:,natom) = bcof(:,:,natom) + bcof_loc(:,:)
#if ( defined(CPP_SOC) && defined(CPP_INVERSION) )
!$ IF (invsat(natom).EQ.1) THEN
!$ jatom = invsatnr(natom)
!$ IF (atoms%invsat(natom).EQ.1) THEN
!$ jatom = sym%invsatnr(natom)
!$ acof(:,:,jatom) = acof(:,:,jatom) + acof_inv(:,:)
!$ bcof(:,:,jatom) = bcof(:,:,jatom) + bcof_inv(:,:)
!$ ENDIF
......@@ -292,7 +282,7 @@ CONTAINS
!$OMP END CRITICAL
!$ DEALLOCATE(acof_loc,bcof_loc)
#if ( defined(CPP_SOC) && defined(CPP_INVERSION) )
!$ DEALLOCATE(acof_inv,bcof_inv)
!$ IF (atoms%invsat(natom).EQ.1) DEALLOCATE(acof_inv,bcof_inv)
#endif
DEALLOCATE(work)
!$OMP END PARALLEL
......
......@@ -77,9 +77,9 @@ set_target_properties(fleur_SOC PROPERTIES Fortran_MODULE_DIRECTORY fleur_SOC_mo
add_executable(fleur_INVS_SOC ${fleur_SRC} ${c_filesFleur})
target_link_libraries(fleur_SOC ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_SOC PUBLIC -DCPP_SOC -DCPP_INVERSION)
set_target_properties(fleur_SOC PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_SOC_modules COMPILE_OPTIONS -Ifleur_INVS_SOC_modules)
target_link_libraries(fleur_INVS_SOC ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_INVS_SOC PUBLIC -DCPP_SOC -DCPP_INVERSION)
set_target_properties(fleur_INVS_SOC PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_SOC_modules COMPILE_OPTIONS -Ifleur_INVS_SOC_modules)
endif()
#parallel executables
......@@ -120,9 +120,9 @@ ${fleur_SRC_MPI})
#fleur_INVS_SOC_MPI
add_executable(fleur_INVS_SOC_MPI ${juDFT_HDF} ${juDFT_SRC_F90} ${fleur_SRC} ${c_filesFleur}
${fleur_SRC_MPI})
target_link_libraries(fleur_SOC_MPI ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_SOC_MPI PUBLIC ${MPI_DEFINITIONS} -DCPP_SOC -DCPP_INVERSION)
set_target_properties(fleur_SOC_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_SOC_MPI_modules COMPILE_OPTIONS -Ifleur_INVS_SOC_MPI_modules)
target_link_libraries(fleur_INVS_SOC_MPI ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_INVS_SOC_MPI PUBLIC ${MPI_DEFINITIONS} -DCPP_SOC -DCPP_INVERSION)
set_target_properties(fleur_INVS_SOC_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_SOC_MPI_modules COMPILE_OPTIONS -Ifleur_INVS_SOC_MPI_modules)
endif ()
#inpgen executable
......
......@@ -86,16 +86,9 @@ CONTAINS
DO ispin = 1, input%jspins
#if ( defined(CPP_INVERSION) && defined(CPP_SOC) )
zso(:,1:DIMENSION%neigd,ispin) = CMPLX(z(:,1:DIMENSION%neigd,ispin),0.0)
CALL abcof(&
atoms_local,neigd,sym,&
cell,&
bkpt,g1,g2,g3,nv1,lapw%nmat,nsz(ispin),zso(1,1,ispin),&
usdus%us(0,1,ispin),usdus%dus(0,1,ispin),usdus%uds(0,1,ispin),&
usdus%duds(0,1,ispin),usdus%ddn(0,1,ispin),&
usdus%ulos(1,1,ispin),usdus%uulon(1,1,ispin),usdus%dulon(1,1,ispin),&
usdus%dulos(1,1,ispin),&
noco_local,ispin,kveclo,oneD,&
acof,bcof,chelp(-llod,1,1,1,ispin))
CALL abcof(atoms_local,dimension%neigd,sym,cell, bkpt,lapw,nsz(ispin),zso(:,:,ispin),&
usdus, noco_local,ispin,kveclo,oneD, acof,bcof,chelp(-atoms%llod:,:,:,:,ispin))
!
!
! transfer (a,b)cofs to (a,b)helps used in hsoham
!
......
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