Commit 01b9d8b8 authored by Daniel Wortmann's avatar Daniel Wortmann

Added code to distribute forcetheo in MPI case

parent 4dbf152a
......@@ -17,7 +17,8 @@ MODULE m_types_mae
PROCEDURE :: next_job=>mae_next_job
PROCEDURE :: eval =>mae_eval
PROCEDURE :: postprocess => mae_postprocess
PROCEDURE :: init => mae_init
PROCEDURE :: init => mae_init !not overloaded
PROCEDURE :: dist => mae_dist !not overloaded
END TYPE t_forcetheo_mae
CONTAINS
......@@ -99,4 +100,21 @@ CONTAINS
END DO
CALL closeXMLElement('Forcetheorem_MAE')
END SUBROUTINE mae_postprocess
SUBROUTINE mae_dist(this,mpi)
USE m_types_mpi
IMPLICIT NONE
CLASS(t_forcetheo_mae),INTENT(INOUT):: this
TYPE(t_mpi),INTENT(in):: mpi
INTEGER:: i,ierr
#ifdef CPP_MPI
INCLUDE 'mpif.h'
IF (mpi%irank==0) i=SIZE(this%theta)
call MPI_BCAST(i,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
IF (mpi%irank.NE.0) ALLOCATE(this%phi(i),this%theta(i),this%evsum(i));this%evsum=0.0
CALL MPI_BCAST(this%phi,i,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(this%theta,i,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
#endif
END SUBROUTINE mae_dist
END MODULE m_types_mae
......@@ -36,6 +36,7 @@
USE m_writeOutHeader
#ifdef CPP_MPI
USE m_mpi_bc_all, ONLY : mpi_bc_all
USE m_mpi_dist_forcetheorem
#endif
#ifdef CPP_HDF
USE m_hdf_tools
......@@ -341,6 +342,9 @@
#ifdef CPP_MPI
CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(l_krla,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL mpi_dist_forcetheorem(mpi,forcetheo)
#endif
IF (mpi%irank.NE.0) THEN
CALL xcpot%init(namex,l_krla)
......
......@@ -10,5 +10,6 @@ if (${FLEUR_USE_MPI})
mpi/mpi_bc_pot.F90
mpi/mpi_col_den.F90
mpi/mpi_make_groups.F90
mpi/mpi_dist_forcetheorem.F90
)
endif()
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