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

Fixed MPI parallelization of Forcetheorem calculations

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