comms_allreduce_cmplx Subroutine

private subroutine comms_allreduce_cmplx(array, size, op)

Reduce complex data to all nodes

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: array
integer, intent(in) :: size
character(len=*), intent(in) :: op

Called By

proc~~comms_allreduce_cmplx~~CalledByGraph proc~comms_allreduce_cmplx comms_allreduce_cmplx interface~comms_allreduce comms_allreduce interface~comms_allreduce->proc~comms_allreduce_cmplx proc~calctdfanddos calcTDFandDOS proc~calctdfanddos->interface~comms_allreduce proc~boltzwann_main boltzwann_main proc~boltzwann_main->proc~calctdfanddos
Help

Source Code


Source Code

  subroutine comms_allreduce_cmplx(array,size,op)
    !! Reduce complex data to all nodes
    implicit none

    complex(kind=dp), intent(inout) :: array
    integer, intent(in)    :: size
    character(len=*), intent(in) :: op

#ifdef MPI
    integer :: error,ierr

    complex(kind=dp), allocatable :: array_red(:)

    allocate(array_red(size),stat=ierr)
    if (ierr/=0) then
       call io_error('failure to allocate array_red in comms_allreduce_cmplx')
    end if

    select case(op)

    case ('SUM')
       call MPI_allreduce(array,array_red,size,MPI_double_complex,MPI_sum,mpi_comm_world,error)
    case ('PRD')
       call MPI_allreduce(array,array_red,size,MPI_double_complex,MPI_prod,mpi_comm_world,error)
    case default
       call io_error('Unknown operation in comms_allreduce_cmplx')

    end select

    call zcopy(size,array_red,1,array,1)

    if(error.ne.MPI_success) then
       call io_error('Error in comms_allreduce_cmplx')
    end if

    if (allocated(array_red)) deallocate(array_red)
#endif

    return

  end subroutine comms_allreduce_cmplx


berry_get_imf_klist berry_get_imfgh_klist berry_get_kubo_k berry_main boltzwann_main calcTDFandDOS check_and_sort_similar_centres clean_ws_translate comms_allreduce comms_allreduce_cmplx comms_allreduce_real comms_array_split comms_barrier comms_bcast comms_bcast_char comms_bcast_cmplx comms_bcast_int comms_bcast_logical comms_bcast_real comms_end comms_gatherv comms_gatherv_real comms_recv comms_recv_char comms_recv_cmplx comms_recv_int comms_recv_logical comms_recv_real comms_reduce comms_reduce_cmplx comms_reduce_int comms_reduce_real comms_scatterv comms_scatterv_int_1 comms_scatterv_int_2 comms_scatterv_int_3 comms_scatterv_real comms_send comms_send_char comms_send_cmplx comms_send_int comms_send_logical comms_send_real comms_setup conv_get_seedname conv_read_chkpt conv_read_chkpt_fmt conv_write_chkpt conv_write_chkpt_fmt dis_extract dis_extract_gamma dis_main dis_proj_froz dis_project dis_windows dos_get_k dos_get_levelspacing dos_main fourier_q_to_R gauss_freq geninterp_main get_AA_R get_BB_R get_CC_R get_FF_R get_HH_R get_module_kmesh get_smearing_index get_SS_R get_win_min group hamiltonian_dealloc hamiltonian_get_hr hamiltonian_setup hamiltonian_wigner_seitz hamiltonian_write_hr hamiltonian_write_rmn hamiltonian_write_tb internal_maxloc internal_set_kmesh internal_write_header io_date io_error io_file_unit io_get_seedname io_print_timings io_stopwatch io_time k_path k_slice kmesh_dealloc kmesh_get kmesh_get_bvectors kmesh_shell_automatic kmesh_shell_fixed kmesh_shell_from_file kmesh_spacing_mesh kmesh_spacing_singleinteger kmesh_supercell_sort kmesh_write master_sort_and_group MinusFermiDerivative my_ICOPY orthogonalize_u overlap_dealloc overlap_project overlap_project_gamma overlap_read overlap_rotate param_dealloc param_get_atoms param_get_block_length param_get_keyword param_get_keyword_block param_get_keyword_kpath param_get_keyword_vector param_get_projections param_get_range_vector param_get_smearing_type param_get_vector_length param_in_file param_lib_set_atoms param_memory_estimate param_postw90_write param_read param_read_chkpt param_uppercase param_write param_write_chkpt param_write_header plot_fermi_surface plot_interpolate_bands plot_main plot_u_matrices plot_wannier print_usage pw90common_fourier_R_to_k pw90common_fourier_R_to_k_new pw90common_fourier_R_to_k_vec pw90common_get_occ pw90common_kmesh_spacing pw90common_wanint_data_dist pw90common_wanint_get_kpoint_file pw90common_wanint_param_dist pw90common_wanint_setup qe_erf qe_erfc R_wz_sc R_wz_sc_equiv script_common script_fermi_lines sitesym_dealloc sitesym_dis_extract_symmetry sitesym_read sitesym_replace_d_matrix_band sitesym_slim_d_matrix_band sitesym_symmetrize_gradient sitesym_symmetrize_rotation sitesym_symmetrize_u_matrix sitesym_symmetrize_zmatrix sort spin_get_moment spin_get_moment_k spin_get_nk symmetrize_ukirr TDF_kpt tran_bulk tran_cut_hr_one_dim tran_dealloc tran_find_integral_signatures tran_get_ht tran_green tran_lcr tran_lcr_2c2_build_ham tran_lcr_2c2_sort tran_main tran_parity_enforce tran_read_htC tran_read_htX tran_read_htXY tran_reduce_hr tran_transfer tran_write_xyz utility_cart_to_frac utility_commutator_diag utility_compar utility_diagonalize utility_frac_to_cart utility_im_tr utility_inv2 utility_inv3 utility_lowercase utility_matmul_diag utility_metric utility_re_tr utility_recip_lattice utility_rotate utility_rotate_diag utility_string_to_coord utility_strip utility_translate_home utility_w0gauss utility_wgauss utility_zgemm wann_calc_projection wann_check_unitarity wann_domega wann_main wann_main_gamma wann_omega wann_omega_gamma wann_phases wann_spread_copy wann_svd_omega_i wann_write_r2mn wann_write_vdw_data wann_write_xyz wannier_run wannier_setup wham_get_D_h wham_get_D_h_a wham_get_deleig_a wham_get_eig_deleig wham_get_eig_UU_HH_JJlist wham_get_JJm_list wham_get_JJp_list wham_get_occ_mat_list wigner_seitz ws_translate_dist ws_write_vec