Commit 55cc1f8e authored by Daniel Wortmann's avatar Daniel Wortmann

Fixed MPI parallelization of Forcetheorem calculations

parent 6a9543ff
...@@ -184,6 +184,12 @@ ...@@ -184,6 +184,12 @@
l_kpts) l_kpts)
END IF END IF
CALL mpi_bc_xcpot(xcpot,mpi) CALL mpi_bc_xcpot(xcpot,mpi)
#ifdef CPP_MPI
#ifndef CPP_OLDINTEL
CALL mpi_dist_forcetheorem(mpi,forcetheo)
#endif
#endif
CALL postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,obsolete,kpts,& CALL postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,obsolete,kpts,&
oneD,hybrid,cell,banddos,sliceplot,xcpot,forcetheo,& oneD,hybrid,cell,banddos,sliceplot,xcpot,forcetheo,&
noco,dimension,enpara,sphhar,l_opti,noel,l_kpts) noco,dimension,enpara,sphhar,l_opti,noel,l_kpts)
...@@ -209,9 +215,6 @@ ...@@ -209,9 +215,6 @@
CALL initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,& CALL initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
DIMENSION,cell,sym,xcpot,noco,oneD,hybrid,& DIMENSION,cell,sym,xcpot,noco,oneD,hybrid,&
kpts,enpara,sphhar,mpi,obsolete) kpts,enpara,sphhar,mpi,obsolete)
#ifndef CPP_OLDINTEL
CALL mpi_dist_forcetheorem(mpi,forcetheo)
#endif
#endif #endif
ELSE ! else branch of "IF (input%l_inpXML) THEN" ELSE ! else branch of "IF (input%l_inpXML) THEN"
......
...@@ -25,16 +25,28 @@ CONTAINS ...@@ -25,16 +25,28 @@ CONTAINS
t=1 t=1
TYPE IS (t_forcetheo_mae) TYPE IS (t_forcetheo_mae)
t=2 t=2
TYPE IS (t_forcetheo_ssdisp)
t=3
TYPE IS (t_forcetheo_dmi)
t=4
TYPE IS (t_forcetheo_jij)
t=5
END SELECT END SELECT
ENDIF ENDIF
CALL MPI_BCAST(t,1,MPI_INTEGER,0,mpi%mpi_comm,ierr) CALL MPI_BCAST(t,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
IF (mpi%irank.NE.0) THEN IF (mpi%irank.NE.0) THEN
IF (ALLOCATED(forcetheo)) DEALLOCATE(forcetheo) IF (ALLOCATED(forcetheo)) DEALLOCATE(forcetheo)
SELECT CASE (t) SELECT CASE (t)
CASE (1) CASE(1)
ALLOCATE(t_forcetheo::forcetheo) ALLOCATE(t_forcetheo::forcetheo)
CASE(2) CASE(2)
ALLOCATE(t_forcetheo_mae::forcetheo) ALLOCATE(t_forcetheo_mae::forcetheo)
CASE(3)
ALLOCATE(t_forcetheo_ssdisp::forcetheo)
CASE(4)
ALLOCATE(t_forcetheo_dmi::forcetheo)
CASE(5)
ALLOCATE(t_forcetheo_jij::forcetheo)
END SELECT END SELECT
END IF END IF
...@@ -42,6 +54,12 @@ CONTAINS ...@@ -42,6 +54,12 @@ CONTAINS
SELECT TYPE(forcetheo) SELECT TYPE(forcetheo)
TYPE IS (t_forcetheo_mae) TYPE IS (t_forcetheo_mae)
CALL forcetheo%dist(mpi) CALL forcetheo%dist(mpi)
TYPE IS (t_forcetheo_ssdisp)
CALL forcetheo%dist(mpi)
TYPE IS (t_forcetheo_dmi)
CALL forcetheo%dist(mpi)
TYPE IS (t_forcetheo_jij)
CALL forcetheo%dist(mpi)
END SELECT END SELECT
#endif #endif
END SUBROUTINE mpi_dist_forcetheorem END SUBROUTINE mpi_dist_forcetheorem
......
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