tem_balance_sparta Subroutine

public subroutine tem_balance_sparta(weight, myPart, nParts, comm, myElems, offset, sparta)

Return splitting positions based on the weights provided by each rank.

This is the SPARTA algorithm which uses simple splitting based on given weights for all elements in the mesh.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: weight(:)

Sorted list of weights corresponding to treeID order

integer, intent(in) :: myPart
integer, intent(in) :: nParts

Number of procs the distribution should span

integer, intent(in) :: comm

MPI Communicator

integer, intent(inout) :: myElems

number of elements

integer(kind=long_k), intent(out) :: offset

Array of offsets with the size nParts. Offset index starts at 0. This Array needs to be allocate and deallocated outside

type(tem_sparta_type), intent(inout) :: sparta

Calls

proc~~tem_balance_sparta~~CallsGraph proc~tem_balance_sparta tem_balance_sparta mpi_exscan mpi_exscan proc~tem_balance_sparta->mpi_exscan proc~tem_set_sparta tem_set_sparta proc~tem_balance_sparta->proc~tem_set_sparta mpi_allreduce mpi_allreduce proc~tem_balance_sparta->mpi_allreduce mpi_alltoall mpi_alltoall proc~tem_set_sparta->mpi_alltoall

Called by

proc~~tem_balance_sparta~~CalledByGraph proc~tem_balance_sparta tem_balance_sparta proc~load_tem load_tem proc~load_tem->proc~tem_balance_sparta program~tem_sparta_test tem_sparta_test program~tem_sparta_test->proc~tem_balance_sparta proc~load_env load_env proc~load_env->proc~load_tem proc~tem_restart_readheader tem_restart_readHeader proc~tem_restart_readheader->proc~load_tem program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->proc~load_env program~tem_varsys_statevar_test tem_varSys_stateVar_test program~tem_varsys_statevar_test->proc~load_env program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->proc~load_env proc~check_variableoperations check_variableOperations proc~check_variableoperations->proc~load_env program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->proc~load_env program~tem_varsys_test tem_varSys_test program~tem_varsys_test->proc~load_env program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->proc~load_env proc~tem_load_restart tem_load_restart proc~tem_load_restart->proc~tem_restart_readheader program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->proc~load_env program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->proc~load_env proc~check_serial_singlelevel_facedesc check_serial_singlelevel_faceDesc proc~check_serial_singlelevel_facedesc->proc~load_env program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->proc~load_env proc~check_parallel_singlelevel_facedesc check_parallel_singlelevel_faceDesc proc~check_parallel_singlelevel_facedesc->proc~load_env program~tem_face_test~3 tem_face_test program~tem_face_test~3->proc~check_parallel_singlelevel_facedesc program~tem_face_test tem_face_test program~tem_face_test->proc~check_serial_singlelevel_facedesc program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->proc~check_variableoperations

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iErr
integer, private :: iElem
integer, private :: iProc
integer(kind=long_k), private :: myElems_long
real(kind=rk), private :: w_sum
real(kind=rk), private :: w_opt
real(kind=rk), private :: send
real(kind=rk), private :: recv
real(kind=rk), private :: lower_boundary
real(kind=rk), private :: upper_boundary
real(kind=rk), private, allocatable:: presum(:)
integer, private :: rmin
integer, private :: rmax
integer, private :: lb
integer, private :: ub
integer, private :: left_off
integer, private :: mid
real(kind=rk), private :: opt_split
real(kind=rk), private :: wsplit
integer, private :: send_count(0:nParts-1)