opernlb_ylm subroutine Inefficient

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
Dominic
Posts: 18
Joined: Mon Jan 21, 2013 4:34 pm

opernlb_ylm subroutine Inefficient

Post by Dominic » Wed Jan 11, 2017 11:21 am

I profiled Abinit with oprofile and found out that too much time is consumed in operlb_ylm subroutine, I think this should be optimized. Here is the full result of the profiling:

Code: Select all

samples  %        image name               symbol name
538427   19.7032  abinit                   opernlb_ylm_
384452   14.0687  libm-2.20.so             __ieee754_exp_avx
251850    9.2162  abinit                   __m_sgfft_MOD_sg_ffty
235887    8.6321  abinit                   __m_pawrad_MOD_screened_coul_kernel
226614    8.2927  abinit                   __m_paw_numeric_MOD_paw_derfc
180592    6.6086  abinit                   opernla_ylm_
154934    5.6697  abinit                   pw_orthon_
131909    4.8271  libm-2.20.so             __sin_avx
71959     2.6333  abinit                   __m_sgfft_MOD_sg_fftx
71680     2.6231  abinit                   __m_sgfft_MOD_fftrisc_one_nothreadsafe
66291     2.4259  libm-2.20.so             __cos_avx
54077     1.9789  libmkl_avx.so            LY16_A16_j4_i8gas_1
52942     1.9374  libm-2.20.so             exp
52769     1.9310  libmkl_avx.so            mkl_blas_avx_zgemm_pst
36204     1.3249  no-vmlinux               /no-vmlinux
36027     1.3184  abinit                   __m_pawrad_MOD_poisson
25192     0.9219  abinit                   __m_paw_numeric_MOD_paw_jbessel_4spline
14067     0.5148  abinit                   wfconv_
12675     0.4638  abinit                   mksubham_
10663     0.3902  abinit                   __m_pawpsp_MOD_pawpsp_nl
8731      0.3195  abinit                   cgwf_
8451      0.3093  libm-2.20.so             sincos
7909      0.2894  abinit                   __m_pawrad_MOD_simp_gen
7265      0.2659  abinit                   __m_pawpsp_MOD_pawpsp_cg
7243      0.2651  libm-2.20.so             __ieee754_pow_sse2
6306      0.2308  abinit                   atm2fft_
5102      0.1867  abinit                   initro_
5065      0.1853  libmkl_avx.so            mkl_blas_avx_xddot
4914      0.1798  libgfortran.so.3.0.0     _gfortran_string_index
4635      0.1696  abinit                   __m_fftcore_MOD_indfftrisc
4330      0.1585  libmkl_avx.so            LSteps1_X16_Y16_Loop32gas_1
4004      0.1465  abinit                   work_lda
3575      0.1308  abinit                   __m_pawpsp_MOD_pawpsp_lo
3513      0.1286  libm-2.20.so             __exp1
2957      0.1082  abinit                   nonlop_ylm_
2907      0.1064  abinit                   g
2526      0.0924  abinit                   getghc_
2439      0.0893  libm-2.20.so             __ieee754_log_avx
2010      0.0736  abinit                   __m_pawfgr_MOD_indgrid
1933      0.0707  abinit                   work_lda
1835      0.0672  abinit                   irrzg_
1625      0.0595  abinit                   __m_sgfft_MOD_sg_fftz
1557      0.0570  abinit                   __libxc_functionals_MOD_libxc_functionals_getvxc
1480      0.0542  abinit                   __m_cgtools_MOD_cg_envlop
1412      0.0517  abinit                   __m_sgfft_MOD_sg_fft_rc
1275      0.0467  abinit                   initylmg_
978       0.0358  abinit                   __m_cgtools_MOD_cg_precon
933       0.0341  abinit                   xc_lda
805       0.0295  libc-2.20.so             __memset_sse2
754       0.0276  libm-2.20.so             __dubsin
744       0.0272  abinit                   rhohxc_
697       0.0255  libm-2.20.so             pow
681       0.0249  abinit                   __m_ewald_MOD_ewald
658       0.0241  libm-2.20.so             csloww1
458       0.0168  libc-2.20.so             __memcpy_avx_unaligned
452       0.0165  abinit                   opernlc_ylm_
445       0.0163  abinit                   bound_
376       0.0138  abinit                   inupper_
372       0.0136  libm-2.20.so             __dubcos
351       0.0128  libc-2.20.so             _int_malloc
350       0.0128  abinit                   xc_lda_c_pw_func
314       0.0115  libgfortran.so.3.0.0     next_char
313       0.0115  abinit                   pawinit_
266       0.0097  libc-2.20.so             free
264       0.0097  abinit                   __m_paw_sphharm_MOD_initylmr
259       0.0095  abinit                   setvtr_
253       0.0093  abinit                   transgrid_
238       0.0087  libmkl_avx.so            LInc1_X16_Loop32gas_1
235       0.0086  libc-2.20.so             ____strtod_l_internal
227       0.0083  abinit                   xc_rho2dzeta
225       0.0082  abinit                   vtowfk_
220       0.0081  libm-2.20.so             __sqr
215       0.0079  abinit                   dotprod_vn_
213       0.0078  abinit                   hartre_
198       0.0072  libgfortran.so.3.0.0     _gfortran_string_len_trim
168       0.0061  abinit                   mkdenpos_
150       0.0055  abinit                   __m_paw_numeric_MOD_paw_spline
149       0.0055  libm-2.20.so             isinf
148       0.0054  libc-2.20.so             malloc
146       0.0053  libgfortran.so.3.0.0     push_char
144       0.0053  abinit                   __m_splines_MOD_splfit
143       0.0052  abinit                   sphereboundary_
139       0.0051  abinit                   ph1d3d_
132       0.0048  libm-2.20.so             __mul_avx
131       0.0048  abinit                   __m_cgtools_MOD_mean_fftr
126       0.0046  ld-2.20.so               do_lookup_x
120       0.0044  abinit                   vtorho_
119       0.0044  abinit                   __m_pawdij_MOD_pawdijxcm
117       0.0043  abinit                   sort_int_
116       0.0042  abinit                   timab_
111       0.0041  abinit                   __m_paw_sphharm_MOD_plm_dtheta
109       0.0040  abinit                   __m_pawdij_MOD_pawdij
104       0.0038  abinit                   pawdensities_
97        0.0035  abinit                   __m_fftcore_MOD_kpgsph
97        0.0035  abinit                   scfcv_
92        0.0034  abinit                   __m_paw_finegrid_MOD_pawgylm
92        0.0034  libm-2.20.so             log
91        0.0033  abinit                   body
86        0.0031  libgfortran.so.3.0.0     read_real
84        0.0031  abinit                   __m_paw_sphharm_MOD_ass_leg_pol
77        0.0028  abinit                   xcpot_
76        0.0028  abinit                   __m_paw_sphharm_MOD_plm_dphi
76        0.0028  libm-2.20.so             trunc
75        0.0027  abinit                   __m_pawxc_MOD_pawxcm
73        0.0027  libc-2.20.so             str_to_mpn.isra.0
70        0.0026  libm-2.20.so             csloww
67        0.0025  libc-2.20.so             malloc_consolidate
66        0.0024  abinit                   nonlop_
59        0.0022  abinit                   mkffnl_
57        0.0021  libmkl_avx.so            Lend_Y16_A16_j4gas_1
56        0.0020  libm-2.20.so             __dbl_mp_avx
53        0.0019  abinit                   zerosym_
52        0.0019  abinit                   xcden_
49        0.0018  abinit                   gstate_
45        0.0016  ld-2.20.so               check_match.isra.0
45        0.0016  ld-2.20.so               strcmp
45        0.0016  libgfortran.so.3.0.0     _gfortran_compare_string
45        0.0016  libgfortran.so.3.0.0     _gfortran_pow_c8_i4
44        0.0016  abinit                   fftpac_
43        0.0016  libm-2.20.so             sub_magnitudes
38        0.0014  libc-2.20.so             __GI___strcmp_ssse3
35        0.0013  abinit                   pawmknhat_
29        0.0011  abinit                   __m_pawdij_MOD_pawdijhat
29        0.0011  libmpi.so.1.0.8          PMPI_Comm_f2c
28        0.0010  abinit                   __m_pawrad_MOD_pawrad_deducer0
28        0.0010  libm-2.20.so             __mp_dbl
27       9.9e-04  abinit                   __m_cgtools_MOD_dotprod_g
27       9.9e-04  abinit                   __m_paw_finegrid_MOD_pawrfgd_fft
26       9.5e-04  libgfortran.so.3.0.0     _gfortrani_list_formatted_read
26       9.5e-04  libgfortran.so.3.0.0     data_transfer_init
25       9.1e-04  libgfortran.so.3.0.0     formatted_transfer
24       8.8e-04  libgcc_s.so.1            __powidf2
23       8.4e-04  abinit                   __m_xmpi_MOD_xmpi_sum_dp
20       7.3e-04  abinit                   __m_cgtools_MOD_projbd
20       7.3e-04  abinit                   pawdenpot_
20       7.3e-04  libgfortran.so.3.0.0     _gfortrani_read_block_form
20       7.3e-04  libm-2.20.so             __mpexp_avx
20       7.3e-04  libmkl_gf_lp64.so        ZCOPY
19       7.0e-04  libc-2.20.so             __memcmp_sse4_1
19       7.0e-04  libc-2.20.so             __memmove_avx_unaligned
19       7.0e-04  libc-2.20.so             _dl_addr
19       7.0e-04  libm-2.20.so             __docos
18       6.6e-04  abinit                   __m_special_funcs_MOD_abi_derfc
18       6.6e-04  libc-2.20.so             __mpn_mul_1
18       6.6e-04  libgfortran.so.3.0.0     _gfortran_internal_pack
18       6.6e-04  libm-2.20.so             __cpy
17       6.2e-04  libc-2.20.so             round_and_return
17       6.2e-04  libmkl_core.so           mkl_serv_lsame
16       5.9e-04  abinit                   __m_xmpi_MOD_xmpi_sum_dpv
16       5.9e-04  libmkl_gf_lp64.so        DDOT
15       5.5e-04  abinit                   fourwf_
15       5.5e-04  libc-2.20.so             __memcpy_sse2
15       5.5e-04  libgfortran.so.3.0.0     format_lex
15       5.5e-04  libm-2.20.so             __add_avx
15       5.5e-04  libmkl_avx.so            LY16_A16_j4gas_1
14       5.1e-04  abinit                   __m_pawxc_MOD_pawxcsum
14       5.1e-04  abinit                   __m_xmpi_MOD_xmpi_comm_size
14       5.1e-04  abinit                   getph_
14       5.1e-04  abinit                   newkpt_
14       5.1e-04  ld-2.20.so               _dl_lookup_symbol_x
14       5.1e-04  libc-2.20.so             hack_digit.13622
14       5.1e-04  libmkl_gf_lp64.so        zgemm_
14       5.1e-04  libmkl_sequential.so     mkl_blas_zgemm
13       4.8e-04  abinit                   intagm_
13       4.8e-04  libmkl_avx.so            mkl_blas_avx_xdcopy
13       4.8e-04  libmkl_core.so           mkl_blas_xzcopy
13       4.8e-04  libmpi.so.1.0.8          PMPI_Comm_size
12       4.4e-04  abinit                   pspini_
12       4.4e-04  libc-2.20.so             __mpn_construct_double
12       4.4e-04  libc-2.20.so             __mpn_divrem
12       4.4e-04  libc-2.20.so             strlen
12       4.4e-04  libc-2.20.so             vfprintf
11       4.0e-04  abinit                   kpgio_
11       4.0e-04  libc-2.20.so             __mpn_lshift
11       4.0e-04  libgfortran.so.3.0.0     _gfortran_size0
11       4.0e-04  libmkl_avx.so            mkl_blas_avx_xzgemv
10       3.7e-04  abinit                   __m_cgtools_MOD_cg_zgemv
10       3.7e-04  abinit                   __m_pawxmlps_MOD_rdpawpsxml
10       3.7e-04  libc-2.20.so             __printf_fp
10       3.7e-04  libgfortran.so.3.0.0     _gfortran_concat_string
10       3.7e-04  libgfortran.so.3.0.0     _gfortrani_convert_real
10       3.7e-04  libmkl_avx.so            mkl_blas_avx_zgemm_mscale
9        3.3e-04  abinit                   mkkin_
9        3.3e-04  abinit                   utf8proc_decompose
9        3.3e-04  libmkl_avx.so            mkl_blas_avx_xzgemm
9        3.3e-04  libmkl_avx.so            mkl_blas_avx_zgemv_n
8        2.9e-04  ld-2.20.so               _dl_relocate_object
8        2.9e-04  libc-2.20.so             __mpn_mul
8        2.9e-04  libgfortran.so.3.0.0     _gfortran_transfer_real
8        2.9e-04  libgfortran.so.3.0.0     _gfortrani_parse_format
8        2.9e-04  libgfortran.so.3.0.0     free_saved.isra.5
8        2.9e-04  libgfortran.so.3.0.0     next_char
8        2.9e-04  libgfortran.so.3.0.0     next_format0
8        2.9e-04  libm-2.20.so             __slowexp_avx
8        2.9e-04  libmkl_sequential.so     mkl_blas_ddot
8        2.9e-04  libmkl_sequential.so     mkl_blas_zgemv
8        2.9e-04  libpthread-2.20.so       pthread_mutex_unlock
7        2.6e-04  abinit                   __dictionaries_base_MOD_allocate_file
7        2.6e-04  abinit                   __dictionaries_base_MOD_allocate_library
7        2.6e-04  abinit                   __dictionaries_base_MOD_set_field
7        2.6e-04  abinit                   __m_mpinfo_MOD_ptabs_fourwf
7        2.6e-04  abinit                   __m_paw_finegrid_MOD_dshpfunc2
7        2.6e-04  abinit                   drivexc_
7        2.6e-04  abinit                   mkkpg_
7        2.6e-04  libc-2.20.so             __parse_one_specmb
7        2.6e-04  libgcc_s.so.1            __umodti3
7        2.6e-04  libgfortran.so.3.0.0     _gfortrani_get_internal_unit
7        2.6e-04  libmkl_avx.so            Lend_of_workgas_1
7        2.6e-04  libmkl_core.so           mkl_blas_xddot
7        2.6e-04  libmpi.so.1.0.8          param_register.constprop.6
6        2.2e-04  abinit                   __m_sgfft_MOD_sg_fftrisc
6        2.2e-04  abinit                   utf8proc_decompose_char
6        2.2e-04  libc-2.20.so             getenv
6        2.2e-04  libgfortran.so.3.0.0     _gfortrani_internal_pack_r8
6        2.2e-04  libgfortran.so.3.0.0     eat_separator
6        2.2e-04  libgfortran.so.3.0.0     finalize_transfer
6        2.2e-04  libgfortran.so.3.0.0     get_fnode
6        2.2e-04  libm-2.20.so             __sub_avx
6        2.2e-04  libmkl_avx.so            mkl_blas_avx_xzcopy
6        2.2e-04  libmkl_avx.so            mkl_blas_avx_zgemm_get_optimal_kernel
6        2.2e-04  libmkl_sequential.so     mkl_serv_set_xerbla_interface
5        1.8e-04  abinit                   __m_cgtools_MOD_sqnorm_g
5        1.8e-04  abinit                   __m_pawcprj_MOD_pawcprj_alloc
5        1.8e-04  abinit                   __m_sgfft_MOD_sg_ctrig
5        1.8e-04  abinit                   __m_xmpi_MOD_xmpi_sum_dp2d
5        1.8e-04  abinit                   utf8proc_iterate
5        1.8e-04  ld-2.20.so               _dl_name_match_p
5        1.8e-04  libgfortran.so.3.0.0     _gfortrani_fbuf_getc_refill
5        1.8e-04  libgfortran.so.3.0.0     _gfortrani_fbuf_read
5        1.8e-04  libgfortran.so.3.0.0     _gfortrani_next_record
5        1.8e-04  libgfortran.so.3.0.0     eat_spaces
5        1.8e-04  libgfortran.so.3.0.0     output_float.isra.9.constprop.21
5        1.8e-04  libgfortran.so.3.0.0     parse_format_list
5        1.8e-04  libm-2.20.so             __dvd_avx
5        1.8e-04  libm-2.20.so             __mul
5        1.8e-04  libmkl_core.so           mkl_blas_xzgemv
5        1.8e-04  libmkl_sequential.so     mkl_blas_zcopy
5        1.8e-04  libmpi_f77.so.1.0.7      mpi_comm_size_f
4        1.5e-04  abinit                   __dictionaries_base_MOD_item_ptr_find
4        1.5e-04  abinit                   __m_paw_an_MOD_paw_an_init
4        1.5e-04  abinit                   __m_paw_atom_MOD_atompaw_shpfun
4        1.5e-04  abinit                   __m_pawdij_MOD_symdij
4        1.5e-04  abinit                   __m_pawrad_MOD_pawrad_init
4        1.5e-04  abinit                   utf8proc_reencode
4        1.5e-04  ld-2.20.so               _dl_fixup
4        1.5e-04  ld-2.20.so               _dl_map_object
4        1.5e-04  libc-2.20.so             __GI_____strtoll_l_internal
4        1.5e-04  libc-2.20.so             __ctype_toupper_loc
4        1.5e-04  libc-2.20.so             snprintf
4        1.5e-04  libgfortran.so.3.0.0     _gfortrani_get_mem
4        1.5e-04  libgfortran.so.3.0.0     _gfortrani_internal_pack_4
4        1.5e-04  libgfortran.so.3.0.0     _gfortrani_open_internal
4        1.5e-04  libmkl_avx.so            LY16_A16_j4_i1gas_1
4        1.5e-04  libmkl_gf_lp64.so        mkl_blas_errchk_zgemm
4        1.5e-04  libmpi.so.1.0.8          try_dlopen
3        1.1e-04  abinit                   __libxc_functionals_MOD_libxc_functionals_ismgga
3        1.1e-04  abinit                   __m_cgtools_MOD_cg_real_zdotc
3        1.1e-04  abinit                   __m_hamiltonian_MOD_init_hamiltonian
3        1.1e-04  abinit                   __m_paw_atom_MOD_atompaw_dij0
3        1.1e-04  abinit                   __m_paw_finegrid_MOD_shapefunc2
3        1.1e-04  abinit                   chkpawovlp_
3        1.1e-04  ld-2.20.so               _dl_add_to_namespace_list
3        1.1e-04  libc-2.20.so             _IO_getline_info
3        1.1e-04  libc-2.20.so             fflush
3        1.1e-04  libc-2.20.so             strchrnul
3        1.1e-04  libc-2.20.so             strtod
3        1.1e-04  libgfortran.so.3.0.0     _gfortran_st_write_done
3        1.1e-04  libgfortran.so.3.0.0     _gfortrani_next_format
3        1.1e-04  libm-2.20.so             __acr
3        1.1e-04  libmkl_avx.so            LEnd_Workgas_1
3        1.1e-04  libmkl_avx.so            mkl_blas_avx_zgemm_zero_desc
3        1.1e-04  libmkl_core.so           mkl_blas_xzgemm
2        7.3e-05  abinit                   __dictionaries_base_MOD_dictionary_nullify
2        7.3e-05  abinit                   __libxc_functionals_MOD_libxc_functionals_isgga
2        7.3e-05  abinit                   __m_cgtools_MOD_cg_zcopy
2        7.3e-05  abinit                   __m_fstrings_MOD_toupper
2        7.3e-05  abinit                   __m_pawpsp_MOD_pawpsp_17in
2        7.3e-05  abinit                   __m_pawpsp_MOD_pawpsp_calc
2        7.3e-05  abinit                   __m_pawrad_MOD_pawrad_copy
2        7.3e-05  abinit                   __m_pawxc_MOD_pawxcsph
2        7.3e-05  abinit                   __m_pawxmlps_MOD_paw_setup_copy
2        7.3e-05  abinit                   __netcdf_MOD_nf90_put_var_1d_eightbytereal
2        7.3e-05  abinit                   __netcdf_MOD_nf90_put_var_1d_fourbyteint
2        7.3e-05  abinit                   ncx_put_int_int
2        7.3e-05  abinit                   nhatgrid_
2        7.3e-05  abinit                   prttagm_
2        7.3e-05  abinit                   size_dvxc_
2        7.3e-05  ld-2.20.so               _dl_map_object_from_fd
2        7.3e-05  ld-2.20.so               dl_open_worker
2        7.3e-05  libc-2.20.so             _IO_default_xsputn
2        7.3e-05  libc-2.20.so             _IO_no_init
2        7.3e-05  libc-2.20.so             __ctype_b_loc
2        7.3e-05  libc-2.20.so             __fxstat64
2        7.3e-05  libc-2.20.so             __mpn_extract_double
2        7.3e-05  libc-2.20.so             __strncmp_ssse3
2        7.3e-05  libc-2.20.so             fgets
2        7.3e-05  libc-2.20.so             memchr
2        7.3e-05  libc-2.20.so             rawmemchr
2        7.3e-05  libc-2.20.so             strrchr
2        7.3e-05  libgcc_s.so.1            __udivti3
2        7.3e-05  libgfortran.so.3.0.0     _gfortran_st_read_done
2        7.3e-05  libgfortran.so.3.0.0     _gfortran_transfer_integer
2        7.3e-05  libgfortran.so.3.0.0     _gfortrani_fbuf_flush
2        7.3e-05  libgfortran.so.3.0.0     _gfortrani_free_internal_unit
2        7.3e-05  libgfortran.so.3.0.0     _gfortrani_free_ionml
2        7.3e-05  libgfortran.so.3.0.0     _gfortrani_write_block
2        7.3e-05  libgfortran.so.3.0.0     _gfortrani_write_i
2        7.3e-05  libgfortran.so.3.0.0     buf_read
2        7.3e-05  libgfortran.so.3.0.0     destroy_unit_mutex
2        7.3e-05  libgfortran.so.3.0.0     finish_separator
2        7.3e-05  libgfortran.so.3.0.0     get_external_unit
2        7.3e-05  libgfortran.so.3.0.0     gfc_itoa
2        7.3e-05  libgfortran.so.3.0.0     mem_read
2        7.3e-05  libmkl_avx.so            LAX16_N4_Loop_M16gas_1
2        7.3e-05  libmkl_avx.so            LY16_A16_j4_i2gas_1
2        7.3e-05  libmkl_avx.so            mkl_blas_avx_dspmv
2        7.3e-05  libmkl_gf_lp64.so        ZDSCAL
2        7.3e-05  libpthread-2.20.so       pthread_mutex_trylock
2        7.3e-05  libpthread-2.20.so       pthread_once
2        7.3e-05  libpthread-2.20.so       pthread_rwlock_rdlock
1        3.7e-05  [vdso] (tgid:3189 range:0x7fff17930000-0x7fff17932000) [vdso] (tgid:3189 range:0x7fff17930000-0x7fff17932000)
1        3.7e-05  abinit                   NC_check_vlen
1        3.7e-05  abinit                   NC_endef
1        3.7e-05  abinit                   NCcoordck.isra.3
1        3.7e-05  abinit                   __dictionaries_MOD_add_dict
1        3.7e-05  abinit                   __dictionaries_MOD_put_value
1        3.7e-05  abinit                   __dictionaries_base_MOD_deallocate_file
1        3.7e-05  abinit                   __dictionaries_base_MOD_get_child_ptr
1        3.7e-05  abinit                   __dictionaries_base_MOD_no_key
1        3.7e-05  abinit                   __dictionaries_base_MOD_storage_null
1        3.7e-05  abinit                   __libxc_functionals_MOD_libxc_functionals_check
1        3.7e-05  abinit                   __m_copy_MOD_alloc_copy_int1d
1        3.7e-05  abinit                   __m_distribfft_MOD_init_distribfft
1        3.7e-05  abinit                   __m_exit_MOD_exit_check
1        3.7e-05  abinit                   __m_paw_atom_MOD_atompaw_vhnzc
1        3.7e-05  abinit                   __m_paw_dmft_MOD_init_sc_dmft
1        3.7e-05  abinit                   __m_paw_ij_MOD_paw_ij_reset_flags
1        3.7e-05  abinit                   __m_pawfgrtab_MOD_pawfgrtab_nullify
1        3.7e-05  abinit                   chkorthsy_
1        3.7e-05  abinit                   chkvars_
1        3.7e-05  abinit                   drivexc_main_
1        3.7e-05  abinit                   dup_NC_attrarrayV
1        3.7e-05  abinit                   free_NC_vararrayV0
1        3.7e-05  abinit                   invacuum_
1        3.7e-05  abinit                   invars1_
1        3.7e-05  abinit                   memana_
1        3.7e-05  abinit                   ncx_put_NC
1        3.7e-05  abinit                   new_NC_string
1        3.7e-05  abinit                   outvar_a_h_
1        3.7e-05  abinit                   outvar_i_n_
1        3.7e-05  abinit                   outvar_o_z_
1        3.7e-05  abinit                   subdiago_
1        3.7e-05  abinit                   swapn4b
1        3.7e-05  abinit                   symbrav_
1        3.7e-05  abinit                   utf8proc_NFC
1        3.7e-05  abinit                   v1h_put_NCtype
1        3.7e-05  abinit                   wrtout_
1        3.7e-05  ld-2.20.so               _dl_check_map_versions
1        3.7e-05  ld-2.20.so               _dl_close_worker.part.0
1        3.7e-05  ld-2.20.so               _dl_map_object_deps
1        3.7e-05  ld-2.20.so               _dl_runtime_resolve
1        3.7e-05  ld-2.20.so               _dl_setup_hash
1        3.7e-05  ld-2.20.so               _dl_signal_cerror
1        3.7e-05  ld-2.20.so               _dl_unload_cache
1        3.7e-05  ld-2.20.so               add_to_global
1        3.7e-05  ld-2.20.so               memcpy
1        3.7e-05  ld-2.20.so               stpcpy
1        3.7e-05  libc-2.20.so             _IO_doallocbuf
1        3.7e-05  libc-2.20.so             _IO_file_close
1        3.7e-05  libc-2.20.so             _IO_file_finish@@GLIBC_2.2.5
1        3.7e-05  libc-2.20.so             _IO_link_in
1        3.7e-05  libc-2.20.so             _IO_padn
1        3.7e-05  libc-2.20.so             _IO_setb
1        3.7e-05  libc-2.20.so             _IO_str_init_static_internal
1        3.7e-05  libc-2.20.so             _IO_un_link
1        3.7e-05  libc-2.20.so             __GI___mempcpy
1        3.7e-05  libc-2.20.so             __close_nocancel
1        3.7e-05  libc-2.20.so             __default_morecore
1        3.7e-05  libc-2.20.so             __memmove_sse2
1        3.7e-05  libc-2.20.so             __mpn_cmp
1        3.7e-05  libc-2.20.so             __mpn_submul_1
1        3.7e-05  libc-2.20.so             __strcasecmp_l_avx
1        3.7e-05  libc-2.20.so             __strncat_sse2_unaligned
1        3.7e-05  libc-2.20.so             __tzfile_compute
1        3.7e-05  libc-2.20.so             __tzfile_read
1        3.7e-05  libc-2.20.so             __uflow
1        3.7e-05  libc-2.20.so             _wordcopy_fwd_dest_aligned
1        3.7e-05  libc-2.20.so             feof
1        3.7e-05  libc-2.20.so             gettimeofday
1        3.7e-05  libc-2.20.so             mmap64
1        3.7e-05  libc-2.20.so             open
1        3.7e-05  libc-2.20.so             realloc
1        3.7e-05  libc-2.20.so             uname
1        3.7e-05  libc-2.20.so             vasprintf
1        3.7e-05  libdl-2.20.so            _dlerror_run
1        3.7e-05  libgfortran.so.3.0.0     _gfortran_adjustl
1        3.7e-05  libgfortran.so.3.0.0     _gfortran_date_and_time
1        3.7e-05  libgfortran.so.3.0.0     _gfortran_matmul_r8
1        3.7e-05  libgfortran.so.3.0.0     _gfortran_transfer_array
1        3.7e-05  libgfortran.so.3.0.0     _gfortran_transfer_character
1        3.7e-05  libgfortran.so.3.0.0     _gfortran_transfer_integer_write
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_fbuf_alloc
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_fstrlen
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_library_start
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_mem_alloc_w
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_open_external
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_read_a
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_size_from_real_kind
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_write_a
1        3.7e-05  libgfortran.so.3.0.0     _gfortrani_write_f
1        3.7e-05  libgfortran.so.3.0.0     calculate_sign.isra.0
1        3.7e-05  libgfortran.so.3.0.0     fd_to_stream
1        3.7e-05  libgfortran.so.3.0.0     write_char
1        3.7e-05  libgfortran.so.3.0.0     write_float
1        3.7e-05  libm-2.20.so             lround
1        3.7e-05  libmkl_avx.so            LAY16_Loop_M16gas_1
1        3.7e-05  libmkl_avx.so            LAY16_M8_Tailgas_1
1        3.7e-05  libmkl_avx.so            LN1_Loop_M8gas_1
1        3.7e-05  libmkl_avx.so            anonymous symbol from section .text
1        3.7e-05  libmkl_avx.so            mkl_blas_avx_xdaxpy
1        3.7e-05  libmkl_avx.so            mkl_blas_avx_xdgemv
1        3.7e-05  libmkl_core.so           __intel_mkl_features_init_body
1        3.7e-05  libmkl_core.so           mkl_lapack_dlaisnan
1        3.7e-05  libmkl_core.so           mkl_lapack_xdsptrd
1        3.7e-05  libmkl_core.so           mkl_serv_load_fun
1        3.7e-05  libmkl_sequential.so     mkl_blas_zdscal
1        3.7e-05  libmpi.so.1.0.8          do_open
1        3.7e-05  libmpi.so.1.0.8          lookup_env
1        3.7e-05  libmpi.so.1.0.8          lookup_file.part.3
1        3.7e-05  libmpi.so.1.0.8          lt_dlclose
1        3.7e-05  libmpi.so.1.0.8          lt_dlopenadvise
1        3.7e-05  libmpi.so.1.0.8          mca_base_component_find
1        3.7e-05  libmpi.so.1.0.8          mca_base_param_find
1        3.7e-05  libmpi.so.1.0.8          mca_base_param_reg_int
1        3.7e-05  libmpi.so.1.0.8          mca_bml_base_close
1        3.7e-05  libmpi.so.1.0.8          mca_btl_base_param_register
1        3.7e-05  libmpi.so.1.0.8          ompi_datatype_create_struct
1        3.7e-05  libmpi.so.1.0.8          ompi_op_base_op_select
1        3.7e-05  libmpi.so.1.0.8          opal_class_initialize
1        3.7e-05  libmpi.so.1.0.8          opal_dss_register
1        3.7e-05  libmpi.so.1.0.8          opal_hash_table_init
1        3.7e-05  libmpi.so.1.0.8          opal_hwloc132_hwloc_bitmap_free
1        3.7e-05  libmpi.so.1.0.8          opal_hwloc132_hwloc_bitmap_set_ith_ulong
1        3.7e-05  libmpi.so.1.0.8          opal_output_close
1        3.7e-05  libmpi.so.1.0.8          opal_util_keyval_yylex
1        3.7e-05  libmpi.so.1.0.8          propagate_nodesets
1        3.7e-05  libmpi.so.1.0.8          tryall_dlopen_module
1        3.7e-05  libmpi.so.1.0.8          vm_open
1        3.7e-05  libpthread-2.20.so       pthread_mutex_lock
1        3.7e-05  libquadmath.so.0.0.0     flt128_printf_fp
1        3.7e-05  mca_coll_basic.so        mca_coll_basic_comm_query
1        3.7e-05  mca_oob_tcp.so           mca_oob_tcp_peer_construct

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: opernlb_ylm subroutine Inefficient

Post by Jordan » Wed Jan 18, 2017 8:57 am

What do you mean by "too much time" .... ?
We have a new implementation of this routine that is much faster but still limited in capabilities compared to opernlb.
We have been working on that point for several month.
Stay tuned

Dominic
Posts: 18
Joined: Mon Jan 21, 2013 4:34 pm

Re: opernlb_ylm subroutine Inefficient

Post by Dominic » Thu Jan 19, 2017 5:09 am

Hi, what I mean is, the profiling showed that there are a lot of statistical hit for opernlb in the CPU, meaning, it is in the CPU longer than other routine, What I noticed is calculation of the Hamiltonian Total energy in the SCF is very slow, its not the convergence that is slow (I think its faster than vasp 15iter-abinit vs 20iter-vasp from our previous benchmarks), Here is an example

Code: Select all

---SELF-CONSISTENT-FIELD CONVERGENCE--------------------------------------------

     iter   Etot(hartree)      deltaE(h)  residm     nres2    diffor    maxfor
 ETOT  1  -106.81426642458    -1.068E+02 5.228E-03 8.879E+00 6.705E-03 6.705E-03
 ETOT  2  -106.75822606778     5.604E-02 7.180E-04 1.147E+00 6.086E-03 5.932E-03
 ETOT  3  -106.72482986940     3.340E-02 2.854E-04 9.291E-02 7.149E-03 5.874E-03
 ETOT  4  -106.72092431199     3.906E-03 7.381E-04 3.754E-02 4.843E-03 5.842E-03


this calculation can reach convergence in about 10 or less iteration. What is too long is the calculations per iterations and I am suspecting it is coming from opernlb

Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Re: opernlb_ylm subroutine Inefficient

Post by Jordan » Thu Jan 19, 2017 12:27 pm

Yes, you are completely right. That's why I wrote we have a new implementation of that routine that is much more efficient but still not very rich in capabilities.
The new version of this routine is much faster in cpu time so it should answer to your question.

and BTW, thanks for the feedbacks. They are welcome !

Cheers

Jordan

Dominic
Posts: 18
Joined: Mon Jan 21, 2013 4:34 pm

Re: opernlb_ylm subroutine Inefficient

Post by Dominic » Fri Feb 03, 2017 9:14 am

It is good news then, hope to hear from it soon!

BTW, my profiling shows that exponential operations took the 2nd longer routine, I would like to implement a new faster but still accurate exp() function that could be enabled from configuration by invoking

Code: Select all

abinit_flavor=aggressive


Of course, the configure should always default to the standard exp() function from abinit when this options is not enabled.

I hope this kind of contribution is welcome, where or to whom could I discuss it?

I tried to contact Jean-Michel Beuken to request an non-admin access to https://gitlab.abinit.org/ with the following detail

Name: James Guana
Username: jobs-git
email: organicchemistry_01@yahoo.com.ph
gitlab site: https://gitlab.com/jobs-git

but no reply since then

User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Re: opernlb_ylm subroutine Inefficient

Post by torrent » Mon Feb 06, 2017 4:26 pm

Dear Dominic,

Concerning the exponential function:
Have you first tried to link an efficient math library?
For exemple, you can link the gsl library (https://www.gnu.org/software/gsl) by:
with_math_flavor="gsl"

Concerning the opernlb function:
the computational load depends strongly on the system you are studying.
If the computation load is large enough and if you link abinit with an efficient blas/lapack library, you can try to put:
use_gemm_nonlop=1
This activates a new version of opernlb routine using GEMM.

Regards,
Marc Torrent
CEA - Bruyères-le-Chatel
France

User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Re: opernlb_ylm subroutine Inefficient

Post by torrent » Mon Feb 06, 2017 4:34 pm

BTW...

Why do you use the screened_coulomb_kernel function?
There is only one way to activate it: using the HSE hybrid functional in the PAW formalism.
This feature is not opened and totally buggy at present.
HSE is available for norm-conserving pseudopotential, not in PAW. We are working on it.

The code for this future feature is present but it has never been opened in the release notes.
The screened coulomb kernel in PAW uses a very large number of exponential. This explain your profile report.
But it is supposed to be called once for all before the iterations...
Marc Torrent
CEA - Bruyères-le-Chatel
France

Dominic
Posts: 18
Joined: Mon Jan 21, 2013 4:34 pm

Re: opernlb_ylm subroutine Inefficient

Post by Dominic » Fri Feb 17, 2017 5:56 pm

Hi, I will test as you suggested, I dont know why it was calculating with screen_coulomb_kernel function, I dont have that setting in the input file and I just used the PAW LDA from ABINIT source directory. My previous tests shows that GSL did not provide improvements but I will test again never the less.

Locked