CP2K 2.4 (Revision 12889)
Classes | Functions | Variables

cp_fm_struct Namespace Reference

represent the structure of a full matrix More...

Classes

struct  cp_fm_struct_type
 keeps the information about the structure of a full matrix More...
struct  cp_fm_struct_p_type

Functions

subroutine, public cp_fm_struct_create (fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block, error)
 allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_retain (fmstruct, error)
 retains a full matrix structure
subroutine, public cp_fm_struct_release (fmstruct, error)
 releases a full matrix structure
LOGICAL, public cp_fm_struct_equivalent (fmstruct1, fmstruct2, error)
 returns true if the two matrix structures are equivalent, false otherwise.
LOGICAL, public cp_fm_struct_compatible (fmstruct1, fmstruct2, error)
 returns true if the two matrix structures are compatible, (i.e. in the same parallel environment) false otherwise.
subroutine, public cp_fm_struct_write (fmstruct, unit_nr, long_description, error)
 writes a description of the matrix structure to the given unit
subroutine, public cp_fm_struct_get (fmstruct, para_env, context, descriptor, ncol_block, nrow_block, nrow_global, ncol_global, id_nr, ref_count, first_p_pos, row_indices, col_indices, nrow_local, ncol_local, nrow_locals, ncol_locals, local_leading_dimension, error)
 returns the values of various attributes of the matrix structure
subroutine, public cp_fm_struct_double (fmstruct, struct, context, col, row, error)
 creates a struct with twice the number of blocks on each core. If matrix A has to be multiplied with B anc C, a significant speedup of pdgemm can be acchieved by joining the matrices in a new one with this structure (see arnoldi in rt_matrix_exp)

Variables

LOGICAL, parameter, private debug_this_module = .TRUE.
CHARACTER(len=*), parameter,
private 
moduleN = 'cp_fm_struct'
INTEGER, save, private last_fmstruct_id_nr = 0
INTEGER, public optimal_blacs_col_block_size = 32
INTEGER, public optimal_blacs_row_block_size = 32

Detailed Description

represent the structure of a full matrix

History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Function Documentation

LOGICAL,public cp_fm_struct::cp_fm_struct_compatible ( TYPE(cp_fm_struct_type),pointer  fmstruct1,
TYPE(cp_fm_struct_type),pointer  fmstruct2,
TYPE(cp_error_type),intent(inout)  error 
)

returns true if the two matrix structures are compatible, (i.e. in the same parallel environment) false otherwise.

Parameters:
fmstruct1: one of the full matrix structures to compare
fmstruct2: the second of the full matrix structures to compare
errorvariable to control error logging, stopping,... see module cp_error_handling
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 447 of file cp_fm_struct.f90.

subroutine,public cp_fm_struct::cp_fm_struct_create ( TYPE(cp_fm_struct_type),pointer  fmstruct,
TYPE(cp_para_env_type),optional,pointer  para_env,
TYPE(cp_blacs_env_type),optional,pointer  context,
INTEGER,intent(in),optional  nrow_global,
INTEGER,intent(in),optional  ncol_global,
INTEGER,intent(in),optional  nrow_block,
INTEGER,intent(in),optional  ncol_block,
INTEGER,dimension(9),intent(in),optional  descriptor,
INTEGER,dimension(2),optional  first_p_pos,
INTEGER,intent(in),optional  local_leading_dimension,
TYPE(cp_fm_struct_type),optional,pointer  template_fmstruct,
LOGICAL,intent(in),optional  square_blocks,
LOGICAL,intent(in),optional  force_block,
TYPE(cp_error_type),intent(inout)  error 
)

allocates and initializes a full matrix structure

Parameters:
fmstructthe pointer that will point to the new structure
para_envthe parallel environment
nrow_globalthe number of row of the full matrix
ncol_globalthe number of colums of the full matrix
nrow_blockthe number of rows of a block of the matrix ! useful defaults are in, do not specify
ncol_blockthe number of colums of a block of the matrix ! useful defaults are in, do not specify
contextthe blacs context of this matrix
local_leading_dimensionthe leading dimension of the locally stored data block
descriptorthe scalapack descriptor of the matrix (if not given a new one is allocated
template_fmstructa matrix structure where to take the default values
errorvariable to control error logging, stopping,... see module cp_error_handling
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 120 of file cp_fm_struct.f90.

References CPPostcondition, error, last_fmstruct_id_nr, machine::m_flush(), optimal_blacs_col_block_size, and optimal_blacs_row_block_size.

Referenced by admm_types::admm_env_create(), rt_propagation::apply_delta_pulse(), rt_propagation::apply_delta_pulse_periodic(), preconditioner::apply_solve_lin_system_fm(), qs_localization_methods::approx_l1_norm_sd(), rt_propagation_methods::aspc_extrapolate(), qs_block_davidson_types::block_davidson_allocate(), rt_propagation_utils::calc_c_mat_force(), mp2_ri_gpw::calculate_Lmin1(), qs_mo_methods::calculate_magnitude(), qs_mo_methods::calculate_orthonormality(), qs_pdos::calculate_projected_dos(), qs_ks_methods::calculate_w_matrix_ot(), qs_ks_methods::calculate_w_matrix_roks(), s_square_methods::compute_s_square(), molecular_states::construct_molecular_states(), wannier_states::construct_wannier_states(), cp_dbcsr_cholesky::cp_dbcsr_cholesky_decompose(), cp_dbcsr_cholesky::cp_dbcsr_cholesky_invert(), cp_dbcsr_cholesky::cp_dbcsr_cholesky_reduce(), cp_dbcsr_cholesky::cp_dbcsr_cholesky_restore(), cp_dbcsr_operations::cp_dbcsr_copy_columns_hack(), cp_dbcsr_diag::cp_dbcsr_heevd(), cp_dbcsr_operations::cp_dbcsr_plus_fm_fm_t_native(), cp_dbcsr_diag::cp_dbcsr_syevd(), cp_dbcsr_diag::cp_dbcsr_syevr(), cp_dbcsr_diag::cp_dbcsr_syevx(), library_tests::cp_fm_gemm_test(), cp_fm_struct_double(), cp_fm_diag::cp_fm_syevd(), rpa_ri_gpw::create_integ_mat(), qs_linres_current::current_build_chi_many_centers(), qs_linres_current::current_build_chi_one_center(), qs_linres_current_utils::current_env_init(), qs_linres_op::current_operators(), qs_linres_current_utils::current_response(), qs_scf_diagonalization::diag_subspace_allocate(), dkh_main::DKH_full_transformation(), library_tests::eigensolver_test(), dkh_main::even2c(), dkh_main::even3b(), qs_scf_block_davidson::generate_extended_space(), qs_scf_block_davidson::generate_extended_space_sparse(), qs_pdos::generate_virtual_mo(), bfgs_optimizer::geoopt_bfgs(), qs_linres_issc_utils::issc_env_init(), qs_linres_issc_utils::issc_response(), qs_tddfpt_eigensolver::iterative_solver(), qs_scf_lanczos::krylov_space_allocate(), qs_scf_lanczos::lanczos_refinement(), qs_scf_lanczos::lanczos_refinement_2v(), qs_linres_methods::linres_solver(), dft_plus_u::lowdin(), population_analyses::lowdin_population_analysis(), qs_mo_methods::make_basis_cholesky(), qs_mo_methods::make_basis_lowdin(), qs_mo_methods::make_basis_simple(), qs_mo_methods::make_basis_sm(), qs_mo_methods::make_basis_sv_dbcsr(), qs_mo_methods::make_basis_sv_fm(), preconditioner::make_full_all(), preconditioner::make_full_all_ortho(), preconditioner::make_full_kinetic(), preconditioner::make_full_s_inverse(), preconditioner::make_full_single(), preconditioner::make_full_single_inverse(), preconditioner::make_full_single_inverse_ortho(), preconditioner::make_full_single_ortho(), qs_scf_post_gpw::make_lumo(), preconditioner::make_sparse_inverse_bif(), dkh_main::mat_arxra(), dkh_main::mat_axa(), mp2_gpw::mp2_gpw_compute(), mp2::mp2_main(), mp2_ri_gpw::mp2_ri_gpw_compute_in(), qs_matrix_pools::mpools_rebuild_fm_pools(), qs_conductivity::optical_conductivity(), qs_p_env_methods::p_postortho(), qs_p_env_methods::p_preortho(), dkh_main::peven1p(), qs_efield_berry::qs_efield_mo_derivatives(), qs_loc_methods::qs_loc_driver(), qs_loc_utils::qs_loc_env_init(), qs_moments::qs_moment_berry_phase(), qs_scf_post_gpw::qs_scf_post_molopt(), mp2_gpw::replicate_mat_to_subgroup(), qs_scf_block_davidson::ritz_coefficients(), qs_loc_utils::rotate_state_to_ref(), rt_propagation_output::rt_calculate_orthonormality(), rt_propagation_output::rt_convergence(), rt_propagation_types::rt_prop_create(), qs_scf::scf_env_check_i_alloc(), qs_scf_post_se::scf_post_calculation_se(), qs_ks_methods::sic_explicit_orbitals(), stm_images::stm_cubes(), qs_mo_methods::subspace_eigenvalues_ks_fm(), qs_tddfpt_types::tddfpt_env_allocate(), stm_images::th_stm_image(), qs_wf_history_methods::wfi_extrapolate(), qs_scf_post_gpw::wfn_mix(), and xas_methods::xas_env_init().

Here is the call graph for this function:

subroutine,public cp_fm_struct::cp_fm_struct_double ( TYPE(cp_fm_struct_type),pointer  fmstruct,
TYPE(cp_fm_struct_type),pointer  struct,
TYPE(cp_blacs_env_type),pointer  context,
LOGICAL  col,
LOGICAL  row,
TYPE(cp_error_type),intent(inout)  error 
)

creates a struct with twice the number of blocks on each core. If matrix A has to be multiplied with B anc C, a significant speedup of pdgemm can be acchieved by joining the matrices in a new one with this structure (see arnoldi in rt_matrix_exp)

Parameters:
fmstructthe struct to create
structstruct of either A or B
col,rowin which direction the matrix should be enlarged
errorvariable to control error logging, stopping,... see module cp_error_handling
History
06.2009 created [fschiff]
Author:
Florian Schiffmann

Definition at line 708 of file cp_fm_struct.f90.

References cp_fm_struct_create(), and cp_fm_struct_get().

Referenced by rt_matrix_exp::arnoldi().

Here is the call graph for this function:

Here is the caller graph for this function:

LOGICAL,public cp_fm_struct::cp_fm_struct_equivalent ( TYPE(cp_fm_struct_type),pointer  fmstruct1,
TYPE(cp_fm_struct_type),pointer  fmstruct2,
TYPE(cp_error_type),intent(inout)  error 
)

returns true if the two matrix structures are equivalent, false otherwise.

Parameters:
fmstruct1: one of the full matrix structures to compare
fmstruct2: the second of the full matrix structures to compare
errorvariable to control error logging, stopping,... see module cp_error_handling
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 403 of file cp_fm_struct.f90.

Referenced by qs_scf_methods::combine_ks_matrices_1(), qs_scf_methods::combine_ks_matrices_2(), cp_cfm_basic_linalg::cp_cfm_add(), cp_cfm_types::cp_cfm_to_cfm(), cp_fm_basic_linalg::cp_fm_scale_and_add(), and cp_fm_types::cp_fm_to_fm_matrix().

Here is the caller graph for this function:

subroutine,public cp_fm_struct::cp_fm_struct_get ( TYPE(cp_fm_struct_type),pointer  fmstruct,
TYPE(cp_para_env_type),optional,pointer  para_env,
TYPE(cp_blacs_env_type),optional,pointer  context,
INTEGER,dimension(9),intent(out),optional  descriptor,
INTEGER,intent(out),optional  ncol_block,
INTEGER,intent(out),optional  nrow_block,
INTEGER,intent(out),optional  nrow_global,
INTEGER,intent(out),optional  ncol_global,
INTEGER,intent(out),optional  id_nr,
INTEGER,intent(out),optional  ref_count,
INTEGER,dimension(2),intent(out),optional  first_p_pos,
INTEGER,dimension(:),optional,pointer  row_indices,
INTEGER,dimension(:),optional,pointer  col_indices,
INTEGER,intent(out),optional  nrow_local,
INTEGER,intent(out),optional  ncol_local,
INTEGER,dimension(:),optional,pointer  nrow_locals,
INTEGER,dimension(:),optional,pointer  ncol_locals,
INTEGER,intent(out),optional  local_leading_dimension,
TYPE(cp_error_type),intent(inout)  error 
)

returns the values of various attributes of the matrix structure

Parameters:
fmstructthe structure you whant info about
errorvariable to control error logging, stopping,... see module cp_error_handling see cp_fm_struct_type attributes for the other arguments
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 594 of file cp_fm_struct.f90.

References CPPostcondition, and error.

Referenced by cp_fm_struct_double(), and qs_ot_types::qs_ot_allocate().

Here is the caller graph for this function:

subroutine,public cp_fm_struct::cp_fm_struct_release ( TYPE(cp_fm_struct_type),pointer  fmstruct,
TYPE(cp_error_type),intent(inout)  error 
)

releases a full matrix structure

Parameters:
fmstructthe structure to release
errorvariable to control error logging, stopping,... see module cp_error_handling
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 351 of file cp_fm_struct.f90.

References cp_blacs_env::cp_blacs_env_release(), cp_para_env::cp_para_env_release(), and CPPostcondition.

Referenced by cp_fm_pool_types::fm_pool_release().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public cp_fm_struct::cp_fm_struct_retain ( TYPE(cp_fm_struct_type),pointer  fmstruct,
TYPE(cp_error_type),intent(inout)  error 
)

retains a full matrix structure

Parameters:
fmstructthe structure to retain
errorvariable to control error logging, stopping,... see module cp_error_handling
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 324 of file cp_fm_struct.f90.

subroutine,public cp_fm_struct::cp_fm_struct_write ( TYPE(cp_fm_struct_type),pointer  fmstruct,
INTEGER,intent(in)  unit_nr,
LOGICAL,intent(in),optional  long_description,
TYPE(cp_error_type),intent(inout)  error 
)

writes a description of the matrix structure to the given unit

Parameters:
fmstructthe structure to print
unit_nrthe number of the unit where to write the description
errorvariable to control error logging, stopping,... see module cp_error_handling
History
08.2002 created [fawzi]
Author:
Fawzi Mohamed

Definition at line 482 of file cp_fm_struct.f90.

References CPPostcondition.


Variable Documentation

LOGICAL,parameter,private cp_fm_struct::debug_this_module = .TRUE.

Definition at line 30 of file cp_fm_struct.f90.

Definition at line 32 of file cp_fm_struct.f90.

Referenced by cp_fm_struct_create().

CHARACTER(len=*),parameter,private cp_fm_struct::moduleN = 'cp_fm_struct'

Definition at line 31 of file cp_fm_struct.f90.

Definition at line 38 of file cp_fm_struct.f90.

Referenced by cp_fm_struct_create(), and qs_environment::qs_init_subsys().

Definition at line 39 of file cp_fm_struct.f90.

Referenced by cp_fm_struct_create().